@rm-graph/core
v0.1.2
Published
RM-Graphs Core - Charting library built on SciChart
Maintainers
Readme
@rm-graph/core
RM-Graphs Core - Framework-agnostic charting library built on SciChart.
Installation
npm install @rm-graph/core
scichartis automatically installed as a dependency!
Usage
import { createLineChart, createBarChart, createAreaChart } from '@rm-graph/core';
// Create a line chart
const chart = await createLineChart('container-id', {
theme: 'dark',
series: [
{
name: 'Revenue',
data: [100, 150, 120, 180, 200],
},
],
xAxis: { title: 'Month' },
yAxis: { title: 'Amount ($)' },
});
// Update data
chart.setData([
{ name: 'Revenue', data: [200, 250, 220, 280, 300] },
]);
// Change theme
chart.setOptions({ theme: 'light' });
// Cleanup when done
chart.destroy();Chart Types
createLineChart- Line charts with optional pointscreateBarChart- Bar/column charts with grouping and stackingcreateAreaChart- Area charts with gradient fills
Theming
Built-in themes: light, dark, modern, midnight
import { getThemeManager } from '@rm-graph/core';
// Register custom theme
getThemeManager().registerTheme({
name: 'custom',
backgroundColor: '#1a1a2e',
colorPalette: ['#ff6b6b', '#4ecdc4'],
// ...
});See main README for full documentation.
