MAIDR JavaScript API
    Preparing search index...

    Module adapters/uplot

    uPlot integration for MAIDR.

    uPlot is a small, fast canvas time-series library, and the engine behind Grafana's time-series panel. This adapter reads a live uPlot instance -- its columnar u.data, its series, axes and scales -- into MAIDR, mounts MAIDR's accessible interface around the chart, draws the reader's position back onto the canvas, and keeps the reading in step with u.setData(...) so streaming metrics can be monitored (M) as they arrive.

    uplot (v1.6+) is loaded by the host page; this module never imports it.

    import uPlot from 'uplot';
    import { maidrPlugin } from 'maidr/uplot';

    new uPlot({
    title: 'CPU usage',
    width: 640,
    height: 320,
    series: [{}, { label: 'CPU %', stroke: 'steelblue' }],
    plugins: [maidrPlugin()],
    }, [timestamps, cpu], document.getElementById('chart'));

    References

    MaidrData → Maidr
    bindUPlot → bindUPlot
    maidrPlugin → maidrPlugin
    extractUPlotData → extractUPlotData
    UPlotExtraction → UPlotExtraction
    UPlotLayerSource → UPlotLayerSource
    MaidrUPlotHandle → MaidrUPlotHandle
    MaidrUPlotOptions → MaidrUPlotOptions
    UPlotInstance → UPlotInstance
    UPlotPlugin → UPlotPlugin
    UPlotSeriesKind → UPlotSeriesKind
    UPlotSeriesMaidrOptions → UPlotSeriesMaidrOptions