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

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #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();
    x: xVal,
    y: yVal



    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


    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 2 years, 4 months ago by 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.