How to draw 3D chart of csv data?

I have data in the following format:

  09:21:07,label,123,234,345,456,657,678,879,890,123,234, etc...

The first column is time. The second is label. Then there are 200th columns with integer values.

I want to draw a XYZ time-chart with these values.

I tried XYZ chart, but I couldn’t make it work.

Is it possible in grafana?

probably possible using business chart plugin, which you will need javascript skills to iterate over those 200+ columns.

examples

How to implement in grafana

or using Business Text and plotly

1 Like

Thank you. Before you posted, I actually started working with Business Charts plugin, and:

// console.log(context);
let source = context.editor.dataset.source;
source.shift()
let source2 = [];
source.map((s) => {
  s[1].split(",").map((v, i) => {
    source2.push([s[0], i, parseFloat(v)]);
  });
});
// console.log(source2);
return {
  dataset: { source: source2 },
  series: [
    {
      type: 'scatter3D',
      encode: { x: 0, y: 1, z: 2 }
    }
  ],
  grid3D: {},
  xAxis3D: {
    type: 'time',
    name: `x time                      `,
    axisLabel: {
      formatter: '{yyyy}-{M}-{d}T{HH}:{MM}:{ss}',
    }
  },
  yAxis3D: { type: 'value', name: 'y index' },
  zAxis3D: { type: 'value', name: 'z value' },
}

results with Apache ECharts in this beauty:

image

1 Like