Home › forums › Using CanvasJS › Hide space between Candlestick/OHLC chart ?
This topic contains 5 replies, has 2 voices, and was last updated by Skyline 1 year, 1 month ago.
I’d like to know if there’s a way to remove space when a financial series is shown (Candlestick or OHLC) using your pretty CanvasJS library.
Infact is very normal that datetime on Axis-X aren’t consecutive due to weekend where there’s no data so there’s some hole in charts.
As you can see there’s spaces between 5-Jan-2017 and 8-Jan-2017, 12-Jan-2017 and 16-Jan-2017 and so on..
Is there a way to have consecutive candlestick shown on graph without any ‘space’ in between ?
You can use axis scale-breaks to remove the empty space. Also you can set spacing to 0, so that it looks continuous.
I will try to do as you suggest
i’m having hard time trying to figure out how to remove spaces on your demo.
I’ve tried this code without any success :
valueFormatString: “DD MMM”,
Could you help me ?
You can apply customBreaks with spacing set to 0 as shown in this jsfiddle.
With some tweak using my data, it worked like a charm ;)
Thx a lot !
You must be logged in to reply to this topic.