Home forums Using CanvasJS Show current time in X axis in stackedcolumn

This topic contains 3 replies, has 2 voices, and was last updated by  Vishwas R 1 month, 4 weeks ago.

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

    adjmpw
    Participant

    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

    Vishwas R
    Keymaster

    @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

    adjmpw
    Participant

    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 months ago by  adjmpw.
    #22649

    Vishwas R
    Keymaster

    @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.