@chartts/core 0.1.0 → 0.1.1

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 ADDED
@@ -0,0 +1,82 @@
1
+ # @chartts/core
2
+
3
+ Beautiful charts. Tiny bundle. Every framework.
4
+
5
+ SVG-first charting library with Tailwind support, under 15kb gzipped. 27 chart types with a flat, declarative API.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install @chartts/core
11
+ ```
12
+
13
+ ## Quick start
14
+
15
+ ```ts
16
+ import { createChart, lineChartType } from "@chartts/core"
17
+
18
+ const chart = createChart(lineChartType, {
19
+ data: {
20
+ labels: ["Jan", "Feb", "Mar", "Apr", "May", "Jun"],
21
+ series: [{ name: "Revenue", values: [4200, 5800, 7100, 6400, 8200, 9600] }]
22
+ },
23
+ width: 600,
24
+ height: 300,
25
+ })
26
+
27
+ document.getElementById("chart").innerHTML = chart.toSVG()
28
+ ```
29
+
30
+ ## Server-side rendering
31
+
32
+ ```ts
33
+ import { renderToString, lineChartType } from "@chartts/core"
34
+
35
+ const svg = renderToString(lineChartType, data, { width: 600, height: 300 })
36
+ // Returns an SVG string you can embed anywhere
37
+ ```
38
+
39
+ ## Chart types
40
+
41
+ Line, bar, area, pie, donut, scatter, bubble, radar, candlestick, waterfall, funnel, gauge, sparkline, heatmap, treemap, boxplot, histogram, polar, radial bar, lollipop, bullet, dumbbell, calendar, combo, sankey, stacked bar, horizontal bar.
42
+
43
+ Tree-shakeable. Import only what you use:
44
+
45
+ ```ts
46
+ import { lineChartType } from "@chartts/core/line"
47
+ import { barChartType } from "@chartts/core/bar"
48
+ ```
49
+
50
+ ## Tailwind integration
51
+
52
+ Charts render as real SVG DOM elements. Style with CSS variables:
53
+
54
+ ```css
55
+ :root {
56
+ --chartts-grid: rgba(0 0 0 / 0.06);
57
+ --chartts-axis: rgba(0 0 0 / 0.15);
58
+ --chartts-text-muted: #64748b;
59
+ --chartts-bg: #ffffff;
60
+ }
61
+ ```
62
+
63
+ ## Framework packages
64
+
65
+ For React, Vue, Svelte, and Solid, use the dedicated packages:
66
+
67
+ ```bash
68
+ npm install @chartts/react # React
69
+ npm install @chartts/vue # Vue
70
+ npm install @chartts/svelte # Svelte
71
+ npm install @chartts/solid # Solid
72
+ ```
73
+
74
+ ## Links
75
+
76
+ - [Documentation](https://chartts.com/docs)
77
+ - [Examples](https://chartts.com/examples)
78
+ - [GitHub](https://github.com/chartts/chartts)
79
+
80
+ ## License
81
+
82
+ MIT