Home Forums Chart Support Show current time in X axis in stackedcolumn

Show current time in X axis in stackedcolumn

Viewing 4 posts - 1 through 4 (of 4 total)
  • #22615

    Here is my code – https://codepen.io/adjmpw/pen/ZMMGpY , When i set following code in x axis , column charts becomes invisible ,whereas it works fine if its 1,2,3

    xVal = new Date();
    dps.push({
    x: xVal,
    y: yVal
    });

    #22618

    @adjmpw,

    It seems to be working with date-time axis aswell.

    Can you kindly create JSFiddle or in Codepen – reproducing the issue you are facing, so that we can look into your code, understand the scenario better and help you out?


    Vishwas R
    Team CanvasJS

    #22626

    I made it working by keeping label as current time , its not working if i add time to X axis

    try adding xValueType: “dateTime”, in data to replicate my issue , thanks..https://codepen.io/adjmpw/pen/eLLxLZ

    • This reply was modified 6 years, 2 months ago by adjmpw.
    #22649

    @adjmpw,

    X-Value can either be numeric or a dateTime value. But in the pen that you have shared x-value seems to be string as curTime() returns a string. You can use labels instead of x-value in this case. Please take a look at this updated pen.


    Vishwas R
    Team CanvasJS

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

You must be logged in to reply to this topic.