QChart set tick with uneven space - qchart

In QChart, how can I set tick with uneven space? In the example chart below, notice the first grid is smaller than others. How is it actually done? Thanks.

You need to set the TickType of your QValueAxis to QValueAxis::TicksDynamic.
Then you can set a tick anchor (i.e. the value where the first tick should be placed, e.g. 80.0 in the example image you provided) and tick intervals (the value between ticks, e.g. 2.5 in the example image)
Please note that dynamic ticks were only introducted in Qt 5.12.

Related

Core Plot Minor Tick Labels on Zoom

I am having Axis Labelling Policy as Fixed Interval for the X-axis . Now on zooming I want the minor tick labels to be shown.Is there any provision for setting the axis labelling policy on the minor ticks that allows for this or in what way can this be achieved.
Use a plot space delegate to monitor changes and add the minor tick marks when zoomed in far enough. Set the minor tick line style to nil to hide them or to a CPTLineStyle to show them. You shouldn't need to adjust any other properties, unless you want to vary the number of minor tick marks based on the zoom level.

Is there any way to automatically calculate the axis labels' step size in Highcharts ?

I have 1000~ data labels on the xAxis and finding a way to automatically calculate the step based on the number of data labels and size of the charts.
Based on the documentation , if I do not set the step property of xAxis.labels , it will be calculated automatically, But in my case it is not.
Current output:
Expected output:
Currenlty the labels look as shown in the image. I'd expect the labels to drop automatically and do not show the ellipses. Any help would be much appreciated. Thanks.
-I'm using Highcharts-5.0.8

How to Change space between series data colums in highcharts?

This is not DUPLICATED!!! Sorry if yes.
I want to increase the space between columns independently to the pointWidth property and the #container width. Please this couple of pictures
and the fiddle is here
How can I edit this space/margin/padding ?
In your current chart, the number of bars you have, combined with the fixed pointWidth of 14 (pixels) you have set on each series, means that the groupPadding setting which you have not set and therefore defaults to 0.2 (x-axis units) is squashing the bar pairs together, overriding any increase you try to set to pointPadding.
If you reduce groupPadding, like so, the pairs will come apart accordingly. If your number or bars and/or chart width are variable, and you want to fix the ratio of the gaps between points and groups, then set your pointPadding and groupPadding as required, and remove the fixed pointWidths you have specified so that the bar widths take up the slack, like this.
You can use pointRange / groupPadding / pointPadding, skipping pointWidth.
http://api.highcharts.com/highcharts

Highcharts highstocks - candlestick graph has last value partially cut

In a candlestick graph i am building, the latest bar is cut-off partially such that even the bar is not visible. Thus it's difficult to judge the high and low by seeing the bar.
I'm unable to post a pic now but it's like the last rectangle being cut in half.
I'm tried a lot of options in the api but can't figure out why this is not showing correctly. The chart margin and axis offset options havent' helped. Is there a way i can set the series margin from the plot area so that it displays right.
For this problem, the best solution is to insert a dummy series which should be hidden from every aspect of the chart. So try this, insert a dummy series from the last point of the data series to some extra buffer(as per need). Then remove this series from the chart by explicitly removing it from the legends (using showinlegend),chart(setting linewidth to 0) and from tooltip by having a check in formatter. Hope this solves your problem.
I had the same problem and couldn't figure it out, because no matter how I changed the xAxis.maxPadding or changed the xAxis.max, it would always cut off the last candlestick when I clicked on the range selector.
To solve it, (hack) I just added an extra data point in my series and set it 1 day past the last day and set all values to null.
Without any code or a pic, it's hard to tell the problem, but it sounds like you need to use the max padding option. http://api.highcharts.com/highcharts#xAxis.maxPadding. You may also want to look at endOnTick as well as whether you are setting max on the axis.

How can I make Core Plot to show an x-axis label for each point in time?

Apart from the issue I am trying to fix atm, I would like to know how I can make the x-axis labels to draw wherever there is a point drawn. As you can see on the screenshot there are three points in time. So instead of the label "1/10/54' (yes that is year 54) floating nowhere, I want three labels, one below each point.
(Note the 3 points are only for illustration, needs to be expandable.)
If the spacing between the labels will be irregular like your sample screenshot, you'll want to change the axis labeling policy to CPTAxisLabelingPolicyNone or CPTAxisLabelingPolicyLocationsProvided. Both policies require you to provide the tick locations. The first policy also requires you to make custom labels that don't have to be at the same locations as the tick marks while the second will automatically make labels at each tick location using the standard label formatter.

Resources