Skip to main content
100%

Scatter Chart

✓ Published1🌍 Public
Aavesh1998
Last edited Jun 3, 2020
Created on Jun 3, 2020
Forked from The d3 test

This example demonstrates a scatter chart using Chart.js, with the scatter plot drawn on an HTML canvas element. The chart is configured with `responsive: true` to adapt to its container’s width, which is set to 50% of the page. The code initializes the chart inside `window.onload` by accessing the canvas context via `getContext("2d")` and creating a new `Chart(ctx).Scatter()` instance. A `randomScalingFactor` function generates random integer data points scaled to 100, but the chart is initialized with empty `scatterData`, so no visible points render until data is provided.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes