Home forums Using CanvasJS Need some help regarding my usage scenario

This topic contains 1 reply, has 2 voices, and was last updated by  Priyanka M S 2 months, 2 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #22680


    I am trying to display live bandwidth utilization using canvas JS. I have faced some difficulties to implement the CanvasJS library. Please help with the followings. Thank you.

    1. https://jsfiddle.net/2jhaL9qk
    This is the basic implementation. I am just pushing the new data points (x: timestamp and y: a random number). I am not using any initial data points. Everything works fine except during the first few seconds, the x-axis labels do not make sense. (Please increase the result tab area in JSfiddle)
    x-axis label

    2. I tried to fix the long random number and tried rounding it with 2 digits after decimal points. In the above JSfiddle, line 66-67, I used .toFixed(2) but the graph plot disappeared.


    3. https://jsfiddle.net/1vwgkmcn/3/
    I tried to display the live statistics only for the last 1 minute. I used chart.options.axisX.viewportMinimum = (time.getTime()-60000); (at line 76 of the above JSfiddle) everytime I pushed a data point.
    3.a) Is there any better option to achieve this?
    3.b) manual select and zoom feature is buggy (it changes every time the viewport is changed, which is every 1 sec in my case). Can it be fixed? If not, I want to remove the pan, zoom, reset buttons from the top. How to remove them?
    3.c) In the first second, the x-axis is inverted. How can I fix it?
    viewportminimum x axis

    • This topic was modified 2 months, 2 weeks ago by  souravndp. Reason: image links edited

    Priyanka M S


    Considering this post to be a duplicate of this thread and hence closing it.

    Priyanka M S
    Team CanvasJS

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

You must be logged in to reply to this topic.