Home Forums Chart Support Hard to zoom around corners of graph

Hard to zoom around corners of graph

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

    Hi, I had a question regarding zooming around corners of a graph.

    It’s hard to zoom around the edges of the graph since the user might move the mouse cursor slightly off the axis. My chart data is generated dynamically, so there’s no way to know what the min/max are going to be along X and Y axis.

    Is there anyway to add margin around the corners? So, for example if I have a data point at (x,y), by adding this margin the chart axis would be upto (x+margin) and (y+margin). In a way, it’s essentially adding margin to whatever min/max viewport values are generated dynamically based on data.

    Another way can be adding a margin around the corners of selecting region on plot without changing the axis min/max.

    • This topic was modified 3 years, 9 months ago by Fergus Ryan. Reason: removing email notification
    #32641

    @nferxchartjs,

    You can set viewportMaximum for x-axis with some margin upon updating dataPoints as shown in this JSFiddle.

    —-
    Manoj Mohan
    Team CanvasJS

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

You must be logged in to reply to this topic.