Search code examples
plotchartslinechartzingchart

Zingchart weird stepped plotting


I am experiencing some weird plotting by Zingchart. I am trying to plot a smooth curve as it can seen in the Excel graph below.

enter image description here

However, when using the same input data on Zingchart, some weird stepped chunks are produced. Is this a problem of Zingchart or have I made a mistake in the configuration?

var chartData = {
    type: "line",
    plot: {
        aspect: "spline"
    },
  series: [  // Insert your series data here.
      {
            "values":[[0.008376349,-9.167595],
            [0.008375615,59.43667],
            [0.008374971,103.23595],
            [0.008374511,-168.06818],
            [0.008374427,-249.25804],
            [0.008375174,125.39198],
            [0.008376393,-355.0086],
            [0.008377762,-130.61668],
            [0.008379059,298.63593],
.....
               [0.009247098,-15090.601],
                [0.009836536,-4773.134]],
                "text":"A/B"
            }
      ]
    };
    zingchart.render({ // Render Method[3]
      id: "chartDiv",
      data: chartData,
      height: 400,
      width: '100%'
    });

Solution

  • Thanks to the excellent response time of Zingchart support who guided me on the answer, it seems that the solution is to change the plot type:

    plot: {
    aspect: "segmented"
    },