Files
noodl-docs/library/modules/chartjs
Eric Tuvesson 656e5fc8d2 chore: Upgrade Docusaurus from v2 to v3 (#52)
* chore: Upgrade Docusaurus from v2 to v3

* chore: Update "Test build" GH workflow

* fix: build

All markdown is processed as MDX

* fix: Broken links
2024-01-12 16:53:22 +01:00
..
2023-09-05 12:08:55 +02:00
2023-09-05 12:08:55 +02:00
2023-09-05 12:08:55 +02:00
2023-11-21 23:10:42 +01:00
2023-09-05 12:08:55 +02:00

title, hide_title
title hide_title
Chart.js Module true

Chart.js Module

GitHub

This module allows you to add charts to your Noodl App, using Chart.js.

Supported chart types:

  • Line and Area
  • Bar
  • Radar
  • Doughnut
  • Pie
  • Polar Area
  • Bubble
  • Scatter

There are many different kinds inputs to change the style of the chart. Like the title, tooltip and legends.

Changing the Data

To style the chart data, it should be added next to the data it want to style. To recreate for example this chart (Bar Chart Border Radius). It should send the style in the datasets to the chart.

Outputs.Data = {
    labels: [
        "January",
        "February",
        "March",
        "April",
        "May",
        "June",
        "July"
    ],
    datasets: [
        {
            label: "Fully Rounded",
            data: [99, 41, 94, 1, 32, -63, 36],
            borderColor: "rgb(255, 99, 132)",
            backgroundColor: "rgba(255, 99, 132, 0.5)",
            borderWidth: 2,
            borderRadius: 1.8,
            borderSkipped: false
        },
        {
            label: "Small Radius",
            data: [-59, -80, -62, -25, -40, 58, 95],
            borderColor: "rgb(54, 162, 235)",
            backgroundColor: "rgba(54, 162, 235, 0.5)",
            borderWidth: 2,
            borderRadius: 5,
            borderSkipped: false
        }
    ]
}

Changing the Scales

Outputs.Scales = {
    x: {
        stacked: true
    },
    y: {
        stacked: true
    }
}