Is there a scatter Chart available for angular


Topic: Is there a scatter Chart available for angular

kevin.tahon pro asked 4 years ago

Hello,

I saw there's a scatter chart available for jquery. Is this also available for Angular, because I don't find it in the documentation.

Kind regards,

Kevin Tahon


Arkadiusz Idzikowski staff answered 4 years ago

We didn't test this chart type in the Angular version, but it should be possible to render it without a problem. Please try this code:

HTML:

<div style="display: block;">
  <canvas
    mdbChart
    [datasets]="scatterChartData"
    [options]="scatterChartOptions"
    [chartType]="scatterChartType"
  >
  </canvas>
</div>

TS:

  scatterChartOptions = {
    responsive: true,
  };

  scatterChartData = [
    {
      data: [
        { x: 1, y: 1 },
        { x: 2, y: 3 },
        { x: 3, y: -2 },
      ],
      label: 'Series A',
      backgroundColor: 'red',
      pointRadius: 10,
    },
  ];
  scatterChartType = 'scatter';

Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 9.3.1
  • Device: Laptop
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No