Skip to content

Can't display mltiple charts on one page. #32

Description

@Gregor-code

When one chart is rendered via their rendering-function

(e.g. function createChart() { let ctx = document.getElementById("barChart"); let myChart = new Chart(ctx, { type: "bar", data: chartData, options: chartOptions, }); })

You can't render a second one by creating the same chart component at index.svelte.

The canvas gets created but the chart does not get displayed on it.

Maybe the solution will be to create a canvas with a new class name each time the bar chart component is rendered.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions