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

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)

Related

Using data line widths in bokeh

Is there a way to provide line width in bokeh in data space, or alternatively can the line width be fixed in a way that zooming does not alter it?
I am trying to draw lines right next to one another without clashes or gaps between them.
Currently, I am using a mapping from line width to coordinate width and change the line widths and line coords in sync to achieve this, but as soon as I zoom the line width is adapted.
Is there a way to provide line width in bokeh in data space
No, but feature requests are welcome!
can the line width be fixed in a way that zooming does not alter it?
Line width is set in screen units - zooming does not alter it by default.
It seems like the problem is that you change your line width in response to the range changes, and zooming does change ranges.

Reduce padding between axis labels and tick markers on Flex charts

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).

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,
}

Column chart horizontal axis misplaced

I am using Flex 3 Column chart component. In this, I have a custom container which in minimized(25% of maximized screen) mode, it is not showing horizontal axis properly(in short not utilizing the whole container area properly) and hence H axis is cut on left and right. If I maximize container, it shows perfect graph.
Attached the image.
I got the problem.
The length of labels on X axis were causing this issue. I reduced the length of labels and it worked fine.

Flex3 Linechart points are too close to the edge

I have a Flex3 LineChart component using an CircleItemRenderer and the datapoints are being cut off because they are too close to the edge. Here's what it looks like:
http://img29.imageshack.us/img29/3850/chartx.png
As you can see, the circles on the left and right sides are being cut off.
How can I make the LineSeries area, plus the horizontal labels, narrower so it fits in the chart area?
Thanks!
I had the same issue and was able to resolve it by setting the clipContent attribute in the chart tag to false. I found this solution on Amy's Flex Diary.
You might want to set the maximum and minimum values in your LinearAxis in the horizontalAxis object. Check the API for more information: http://livedocs.adobe.com/flex/3/langref/mx/charts/LinearAxis.html
The Line Chart determines automatically these values to fill all the elements in the screen. You might want to change these values so the graph has some space at the sides.
You can set the padding property on the horizontalAxis and verticalAxis child objects as well...
Adjust the mask on the chart component.
I got this to work by changing the type from LineChart to ColumnChart. I still had all of the same axis definitions including Line Series. The results are the same Line graph, but more centered on the graph instead of touching the edges. None of the other padding or gutters were what I was looking for.
I got d solution.
create creationComplete event in LineChart
edit horizontalAxis's padding you want
e.target.horizontalAxis.padding = 0.2;

Resources