Reduce padding between axis labels and tick markers on Flex charts - apache-flex

I have a mx.charts.LineChart in Flex and I would like to know how to reduce the padding between the value labels and the tick markers? I've highlighted the region I mean with yellow boxes in the image below.
I'd like the labels to be as close as possible to the tick markers, just a couple of pixels will do.
I only care about applying this to the x-axis.
I'd also be interested to know how to reduce the padding between the axis title (e.g. kB and minutes on chart below) and the value labels.

Use the labelGap style of the AxisRenderer class.
By default it is 3 pixels, you can set it to 0 (or even a negative value if still not close enough).
For positioning the axis title there is no easy solution. You could write the vertical axis title yourself, as a label on top left of the chart. An advantage is that it is much better for the user to read (than the vertical writing).

Related

How to set the width of the Y-Axis labels?

I have 2 charts added to a dashboard, and sharing a common custom cursor.
How do I make sure the width of the columns displaying the Y-Axis ticks have the same width, (so that the custom cursor line matches up perfectly)?
The easiest way is to explicitly configure the thickness of both Y axes to the same pixel value.
chart1.getDefaultAxisY().setThickness(140)
chart2.getDefaultAxisY().setThickness(140)

Highcharts: how to make y-axis labels CSS sticky?

I have a long data grid that is a combination of a normal html data grid (table) and highcharts horizontal bar charts (1 per row). The TH elements in the table grid are position sticky, and I want the corresponding y-axis labels to have the same behavior. Basically when the user scrolls the table the highcharts y-axis labels scroll up and then "pin" to the top of the view, with teh data grid rows scrolling beneath it.
I can't figure out how to control the y-axis labels to force them to obey position sticky... probably because they're rendering in SVG. Is this possible? Is there a way to replicate the concept of position sticky for highcharts axis labels?

How to disable auto hiding of labels on Category Axis?

In amCharts column chart, labels on category axis are alternately hidden when user reduces the browser width.
Please refer JSFiddle in the comments (When the JSFiddle output box is dragged inwards, amCharts starts hiding alternative labels on category axis as shown in screenshot above).
How to disable auto hiding of labels on category axis? Requirement is to scale down the chart (without hiding any label), when user reduces the browser size. This issue occurs when you add more columns beyond certain count.
There is a way to increase the number of labels shown, however it won't force them to show, when they're out of the renderrange of the chart. (I've also tested forceShowField, but this doesn't work for me)So the way how you could do it is setting the minHorizontalGap to zero (or at least a lower value than default which is 75). Check docs and your modified JSFiddle.
"categoryAxis": {
"gridPosition": "start",
autoWrap:false,
minHorizontalGap:0,
}

Javafx chart show more empty space

I am customizing the javafx charts a bit adding valuelabels etc above bars and sliding out certain parts of piecharts. The problem is some of the extras come outside of the visual area.
Is there a simple way to get piecharts to become smaller (but the chart component itself retain its size so that there is more empty space surround the pie?
The same issue with barcharts. I need more empty space above my vertical bars, and more empty space to the right of my horizontal bars.
All data in the table has Number(mostly BigDeicmal) for its value and String for its key and series.

Flex - Placement of Legend for a chart

I would like to be able to specify the placement of a legend for a linechart. Currently, it continues to appear to the right of the chart. I have tried playing with the width/height of the chart to no avail... Putting the legend before the linechart in the mxml causes it to appear to the left. I can't seem to get it appear at the bottom though. I can't seem to find any good examples for this. They don't seem to specify anything but the legend usually shows up below the chart, I can't seem to do it. Optionally, it would be okay to somehow minimize the legend..
what container are your line chart and legend in? its sounds like you are using either an HBox or an application with the layout="horizontal". To move the legend below use either a VBox or application layout of vertical. Or you can use a canvas and use constraints (left, right, top, bottom) or x and y coordinates

Resources