Home Forums Chart Support Hide space between Candlestick/OHLC chart ?

Hide space between Candlestick/OHLC chart ?

Viewing 6 posts - 1 through 6 (of 6 total)
  • #19778

    Hi,
    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.

    You can check what i’m talking about in your demo here : https://canvasjs.com/javascript-charts/ohlc-chart-json-data-ajax/

    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 ?

    Thx
    Regards

    #19780

    @Skyline,

    You can use axis scale-breaks to remove the empty space. Also you can set spacing to 0, so that it looks continuous.


    Vishwas R
    Team CanvasJS

    #19782

    Hi Vishwas,
    I will try to do as you suggest

    Thx
    Regards

    #19783

    Hi Vishwas,
    i’m having hard time trying to figure out how to remove spaces on your demo.
    I’ve tried this code without any success :

    axisX: {
    valueFormatString: “DD MMM”,
    scaleBreaks: {
    autoCalculate: true,
    spacing: 0
    }
    },

    Could you help me ?
    Thx
    Regards

    #19788

    @skyline,

    You can apply customBreaks with spacing set to 0 as shown in this jsfiddle.


    Vishwas R
    Team CanvasJS

    #19789

    With some tweak using my data, it worked like a charm ;)

    Thx a lot !
    Regards

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.