-1

Is it possible to implement a step chart using ngx-charts?

https://swimlane.gitbook.io/ngx-charts/

Step chart example

Thank you

DenisP
  • 13
  • 3

2 Answers2

0

Out of the box? I don't think so. Simplest way is data multiplication I guess.

enter image description here

export var multi = [
  {
    name: 'USA',
    series: [
      {
        name: '1990',
        value: 250000000,
      },
      {
        name: '2010',
        value: 250000000,
      },
      {
        name: '2010',
        value: 25000000,
      },
      {
        name: '2011',
        value: 25000000,
      },
      {
        name: '2011',
        value: 88000000,
      },
      {
        name: '2012',
        value: 88000000,
      },
    ],
  },
];

Working example: https://stackblitz.com/edit/swimlane-line-chart-bl4wjq?file=app%2Fdata.ts

Joosep Parts
  • 5,372
  • 2
  • 8
  • 33
0

OK, I switched to Angluar wrapper for Apache Echarts. They have step chart out of the box.

https://xieziyu.github.io/ngx-echarts/#/welcome

DenisP
  • 13
  • 3