Highcharts - how to correctly align x-axis ticks when plotOptions.column.crisp set to false - highcharts

I recently found that there is a built-in option to disable crisp for bar and column charts, which is awesome! However, I noticed that x-axis ticks slightly off (I believe ticks distance gets calculated based on crisp-true). Is there a way to align them properly?
Here are docs https://api.highcharts.com/highcharts/plotOptions.column.crisp
Updated example:
https://jsfiddle.net/bqo9dv5a/
Ideally, I want ticks to be centered for each column.
Thank you!

I found this parameter on documentation (xAxis.offset), maybe it will help achieve what you want.
API Reference: https://api.highcharts.com/highcharts/xAxis.offset
Live Demo: https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/yaxis/offset/

Related

Stacked value with line chart with highcharts

I got an situation like this. I would like to using line chart to draw stacked value. I have tried google search but i can't find the solution.
For example: On date May/23 i got 3 values, i would like to display these on line-chart.
How could i achieve this? Does highcharts support to do this one. Please take a look at the link attach to clearer the question
Stacked line chart image
Addition info: Im using highcharts to do this one
Thanks for any comment or answer
Follow jlbriggs
I should use scatter-chart to achieve this one
Regarding the tooltip, I would suggest using a scatter series instead of a line. Set the lineWidth in the plotOptions and it will plot just like a line series, but the tool tips are handled differently. Example: jsfiddle.net/jlbriggs/c1o8Lwgv

Controlling shown y-axis labels?

So I am using the Charts framework (formerly ios-charts) for a couple of charts.
One of them in a bar chart where the y-axis is duration in seconds - that I then convert into readable minute:second notation with a formatter.
But the selected interval of labels bugs me a little. I would like to control them so they are only shown at intervals that makes sense for this - like say every half or full minute. But I can't seem to find a way to do that for that axis. Only the x-axis seems to have options for that?
So am I missing something here? Or it is not in the framework?
Whoops. Never mind. I found the 'granularity' property on the axis right after asking. And it seems to do what I need.

Highcharts combination

I would like to ask about chart combination in Highcharts.
Is there any possible combine the multiple axis chart which is located in Highcharts with the Highstock scroll bar features ?
thank you for reply.
You can use highstock.js with combine with Highcharts. Then scrollbar will be avaiable. Please take look at example:
http://jsfiddle.net/anm6z/1/
I don't know about scroll bar but there is a example called master-detail check it out once. it may be helpful to you

Highcharts: Dynamically change single column width to highlight one sample

In a Highcharts column chart we'd like to highlight one value/sample by drawing its column a little bit wider... But this seems not to be possible, is it?
pointWidth only affects the whole series.
Maybe I could overlay a second series, but IMHO that's not a nice solution.
You can also use data attribute and modify width.
http://jsfiddle.net/cDvmy/2/
chart.series[0].data[0].graphic.attr({
width:50
});
I don't see any way to do this with the current API. As an equally not nice solution you could adjust the SVG after the plot is drawn:
// make fifth bar of first series wider
var bar = $($('.highcharts-series').children()[4]);
bar.attr('width',parseInt(bar.attr('width'))+20);
bar.attr('x',parseInt(bar.attr('x'))-10); // keep it centered
Fiddle here.

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.

Resources