blazeplot 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -2
- package/dist/Chart-BW9JaHs6.js +2903 -0
- package/dist/Chart-BW9JaHs6.js.map +1 -0
- package/dist/OverlayUtils-Cw1o8UH-.js +35 -0
- package/dist/OverlayUtils-Cw1o8UH-.js.map +1 -0
- package/dist/core/SeriesStore.d.ts +9 -0
- package/dist/core/SeriesStore.d.ts.map +1 -1
- package/dist/core/UniformRingBuffer.d.ts +67 -0
- package/dist/core/UniformRingBuffer.d.ts.map +1 -0
- package/dist/core/index.d.ts +3 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/types.d.ts +13 -1
- package/dist/core/types.d.ts.map +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +153 -2185
- package/dist/index.js.map +1 -1
- package/dist/interaction/AxisController.d.ts +45 -3
- package/dist/interaction/AxisController.d.ts.map +1 -1
- package/dist/interaction/index.d.ts +1 -0
- package/dist/interaction/index.d.ts.map +1 -1
- package/dist/linked.d.ts +3 -0
- package/dist/linked.d.ts.map +1 -0
- package/dist/linked.js +64 -0
- package/dist/linked.js.map +1 -0
- package/dist/plugins/annotations.d.ts +3 -0
- package/dist/plugins/annotations.d.ts.map +1 -0
- package/dist/plugins/annotations.js +163 -0
- package/dist/plugins/annotations.js.map +1 -0
- package/dist/plugins/crosshair.d.ts +3 -0
- package/dist/plugins/crosshair.d.ts.map +1 -0
- package/dist/plugins/crosshair.js +192 -0
- package/dist/plugins/crosshair.js.map +1 -0
- package/dist/plugins/interactions.js +87 -65
- package/dist/plugins/interactions.js.map +1 -1
- package/dist/plugins/navigator.d.ts +3 -0
- package/dist/plugins/navigator.d.ts.map +1 -0
- package/dist/plugins/navigator.js +147 -0
- package/dist/plugins/navigator.js.map +1 -0
- package/dist/plugins/selection.d.ts +3 -0
- package/dist/plugins/selection.d.ts.map +1 -0
- package/dist/plugins/selection.js +144 -0
- package/dist/plugins/selection.js.map +1 -0
- package/dist/plugins/tooltip.js +29 -45
- package/dist/plugins/tooltip.js.map +1 -1
- package/dist/react.d.ts +14 -0
- package/dist/react.d.ts.map +1 -0
- package/dist/react.js +30 -0
- package/dist/react.js.map +1 -0
- package/dist/render/ReglBackend.d.ts +1 -0
- package/dist/render/ReglBackend.d.ts.map +1 -1
- package/dist/render/Renderer.d.ts +1 -0
- package/dist/render/Renderer.d.ts.map +1 -1
- package/dist/render/types.d.ts +1 -0
- package/dist/render/types.d.ts.map +1 -1
- package/dist/ui/Annotations.d.ts +94 -0
- package/dist/ui/Annotations.d.ts.map +1 -0
- package/dist/ui/Chart.d.ts +83 -1
- package/dist/ui/Chart.d.ts.map +1 -1
- package/dist/ui/ChartLayout.d.ts +10 -0
- package/dist/ui/ChartLayout.d.ts.map +1 -1
- package/dist/ui/Crosshair.d.ts +60 -0
- package/dist/ui/Crosshair.d.ts.map +1 -0
- package/dist/ui/Interactions.d.ts.map +1 -1
- package/dist/ui/LinkedCharts.d.ts +23 -0
- package/dist/ui/LinkedCharts.d.ts.map +1 -0
- package/dist/ui/Navigator.d.ts +32 -0
- package/dist/ui/Navigator.d.ts.map +1 -0
- package/dist/ui/OverlayUtils.d.ts +17 -0
- package/dist/ui/OverlayUtils.d.ts.map +1 -0
- package/dist/ui/Selection.d.ts +64 -0
- package/dist/ui/Selection.d.ts.map +1 -0
- package/dist/ui/Tooltip.d.ts.map +1 -1
- package/dist/ui/theme.d.ts +12 -0
- package/dist/ui/theme.d.ts.map +1 -1
- package/package.json +35 -1
package/README.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
<img src="assets/blazeplot.png" alt="BlazePlot" width="720" />
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
|
+
<noscript><a href="https://liberapay.com/cervelli/donate"><img src="https://img.shields.io/liberapay/patrons/cervelli.svg?logo=liberapay"></a></noscript>
|
|
5
6
|
[](https://www.npmjs.com/package/blazeplot)
|
|
6
7
|
[](https://www.npmjs.com/package/blazeplot)
|
|
7
8
|
[](LICENSE)
|
|
@@ -158,18 +159,26 @@ import { Chart } from "blazeplot";
|
|
|
158
159
|
import { interactionsPlugin } from "blazeplot/plugins/interactions";
|
|
159
160
|
import { legendPlugin } from "blazeplot/plugins/legend";
|
|
160
161
|
import { tooltipPlugin } from "blazeplot/plugins/tooltip";
|
|
162
|
+
import { annotationsPlugin } from "blazeplot/plugins/annotations";
|
|
161
163
|
|
|
162
164
|
const chart = new Chart(container, {
|
|
163
165
|
hover: { mode: "nearest-x", group: "x" },
|
|
164
166
|
plugins: [
|
|
165
167
|
interactionsPlugin({ axis: "xy" }),
|
|
168
|
+
annotationsPlugin({
|
|
169
|
+
annotations: [
|
|
170
|
+
{ type: "y-line", y: 0, label: "baseline" },
|
|
171
|
+
{ type: "x-range", xMin: 10, xMax: 20, label: "event" },
|
|
172
|
+
{ type: "point", x: 42, y: 1.2, shape: "diamond", label: "marker" },
|
|
173
|
+
],
|
|
174
|
+
}),
|
|
166
175
|
legendPlugin(),
|
|
167
176
|
tooltipPlugin({ mode: "nearest-point", group: "none", maxDistancePx: 24 }),
|
|
168
177
|
],
|
|
169
178
|
});
|
|
170
179
|
```
|
|
171
180
|
|
|
172
|
-
Built-in plugins are optional. `interactionsPlugin()` provides plain-drag box zoom, Shift+drag plot pan, wheel zoom, double-click reset, and `axis: "x" | "y" | "xy"`. When outside axes are visible, scrolling an axis zooms that axis and dragging an axis pans that axis; the plugin also applies a subtle axis hover color/filter configurable with `axisHover`, `axisHoverColor`, and `axisHoverFilter`. Legend/tooltip consume public APIs (`getSeriesState`, `setSeriesVisible`, `pick`, and `subscribe`) so custom UI can use the same contract. The default tooltip updates while the cursor is still on live charts and highlights the raw sample(s) it is reporting. For shared time-series tooltips, use `group: "x"`; for scatter/true point hover, use `group: "none"`.
|
|
181
|
+
Built-in plugins are optional. `interactionsPlugin()` provides plain-drag box zoom, Shift+drag plot pan, wheel zoom, double-click reset, and `axis: "x" | "y" | "xy"`. When outside axes are visible, scrolling an axis zooms that axis and dragging an axis pans that axis; the plugin also applies a subtle axis hover color/filter configurable with `axisHover`, `axisHoverColor`, and `axisHoverFilter`. `annotationsPlugin()` supports common plot annotations: vertical/horizontal lines, X/Y bands, boxes, point markers, and labels. Legend/tooltip consume public APIs (`getSeriesState`, `setSeriesVisible`, `pick`, and `subscribe`) so custom UI can use the same contract. The default tooltip updates while the cursor is still on live charts and highlights the raw sample(s) it is reporting. For shared time-series tooltips, use `group: "x"`; for scatter/true point hover, use `group: "none"`.
|
|
173
182
|
|
|
174
183
|
### `SeriesStore`
|
|
175
184
|
|
|
@@ -189,7 +198,7 @@ Built-in plugins are optional. `interactionsPlugin()` provides plain-drag box zo
|
|
|
189
198
|
| `capacity` | Ring buffer capacity (samples). |
|
|
190
199
|
| `id?` / `name?` | Optional metadata exposed to plugins, legend, and tooltip rows. |
|
|
191
200
|
| `yAxis?` | `"left"` or `"right"`; selects the primary or secondary Y viewport/axis for this series. |
|
|
192
|
-
| `downsample` | `"minmax"` or `"none"`. Min/max LOD applies to line
|
|
201
|
+
| `downsample` | `"minmax"` or `"none"`. Min/max LOD applies to line/bar rendering. Scatter with LOD uses a 2D viewport-aware point sampler; scatter with `"none"` renders exact 2D-culled chunks. Area renders raw sampled strips. |
|
|
193
202
|
|
|
194
203
|
### `SeriesStyle`
|
|
195
204
|
|