Skip to content

Create a line chartJS with multiple datasets and multiple label sets #4085

Description

@itg-assistant

Kieran asked 2023-02-28 15:43:31 UTC

Hi,

Is it possible to create a chart using chartJS that contains multiple datasets but each dataset has unique labels.

For example:

data1 = { 10, 20, 30, 40 }, yLabels1 = { "2", "4", "6", "8" }

data2 = { 15, 25, 35, 45 }, yLabels2 = { "3", "5", "7", "9" }

Then the resulting chart is like the image attached. Note that in the actual data used, the x-axis increments are not uniform like the example provided, they are datetime values like:

x: 3/8/2022 12:00:00 AM       y: 323
x: 3/28/2022 12:00:00 AM     y: 100
x: 6/2/2022 12:00:00 AM       y: 15

Metadata

Metadata

Assignees

No one assigned

    Labels

    GeneralQuestions, how-tos and everything else.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions