meo-canvas - v8.0.1
    Preparing search index...

    Function Chart

    • Draws a bar, line, pie or doughnut chart.

      The shape of data follows type: cartesian charts take labelled datasets, pie and doughnut take a flat list of slices.

      Type Parameters

      Parameters

      Returns {
          __type: "Chart";
          props: Omit<ChartProps<ChartType>, "options"> & {
              options?: Record<string, unknown>;
          };
      }

      • __type: "Chart"

        A chart, drawn from data rather than from child nodes.

      • props: Omit<ChartProps<ChartType>, "options"> & { options?: Record<string, unknown> }

        The chart minus its options, which are widened so they survive the worker boundary.

      Chart({
      type: 'bar',
      width: 480,
      height: 240,
      data: {
      labels: ['Mon', 'Tue', 'Wed'],
      datasets: [{ label: 'Renders', data: [12, 19, 7], color: '#38bdf8' }],
      },
      options: { showValues: true, showLegend: true },
      })