Scatter Plot
Correlation
Does more of X really move Y, or are you chasing a coincidence? Plot your points and the trend, the clusters, and the outliers all surface at a glance, with bubble size carrying a third variable for free. The Pearson correlation comes back in getContext(), so you can quote the number instead of squinting at the cloud.
canvas · responsive
The chart above is the same engine in every framework - only the integration code below differs.
Usage
tsx
import { ScatterChart } from "@michi-vz/react";
export default () => <ScatterChart {...props} />; // props = the chart optionsvue
<script setup>
import { ScatterChart } from "@michi-vz/vue";
</script>
<template>
<ScatterChart :options="props" />
</template>svelte
<script>
import { scatterChart } from "@michi-vz/svelte";
</script>
<div use:scatterChart={props}></div>ts
// main.ts - register the elements once
import "@michi-vz/angular";
import { applyScatterChartProps } from "@michi-vz/angular";
// component (uses CUSTOM_ELEMENTS_SCHEMA)
// template: <michi-vz-scatter-chart #c></michi-vz-scatter-chart>
applyScatterChartProps(this.c.nativeElement, props);html
<script type="module" src="https://cdn.jsdelivr.net/npm/@michi-vz/wc"></script>
<michi-vz-scatter-chart id="c"></michi-vz-scatter-chart>
<script>
Object.assign(document.getElementById("c"), props); // dataSet/series, title, …
</script>ts
import { mountScatterChart } from "@michi-vz/core";
const chart = mountScatterChart(el, props);
chart.update(next);
chart.getContext(); // renderer-agnostic, LLM-ready
chart.destroy();API
Props are typed as ScatterChartProps in @michi-vz/core. Shared across all charts: width, height, margin, colors / colorsMapping, renderer ("svg" | "canvas"), highlightItems, disabledItems, and the on* callbacks. onChartDataProcessed / getContext() return the renderer-agnostic ChartContext.