react-native-metrify 0.1.0-alpha.2 → 0.1.0-alpha.3

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.
Files changed (2) hide show
  1. package/README.md +111 -51
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -88,24 +88,48 @@ export default function Dashboard() {
88
88
  return (
89
89
  <View>
90
90
  <KPI
91
- value={1234}
92
- label="Total Sales"
93
- trend={12.5}
94
- format="currency"
91
+ data={{
92
+ value: 1234,
93
+ label: 'Total Sales',
94
+ delta: 12.5,
95
+ trend: 'up',
96
+ format: 'currency',
97
+ currency: 'USD',
98
+ }}
99
+ width={300}
100
+ height={120}
95
101
  />
96
102
 
97
103
  <LineChart
98
- data={[10, 25, 15, 40, 30, 55, 45]}
104
+ data={{
105
+ series: [{
106
+ data: [
107
+ { x: 0, y: 10 },
108
+ { x: 1, y: 25 },
109
+ { x: 2, y: 15 },
110
+ { x: 3, y: 40 },
111
+ { x: 4, y: 30 },
112
+ { x: 5, y: 55 },
113
+ { x: 6, y: 45 },
114
+ ],
115
+ color: '#007AFF',
116
+ }],
117
+ }}
99
118
  width={300}
100
119
  height={200}
101
120
  />
102
121
 
103
122
  <Gauge
104
- value={75}
105
- min={0}
106
- max={100}
123
+ data={{
124
+ value: 75,
125
+ max: 100,
126
+ label: 'Progress',
127
+ unit: '%',
128
+ }}
107
129
  width={200}
108
130
  height={200}
131
+ startAngle={-120}
132
+ endAngle={120}
109
133
  />
110
134
  </View>
111
135
  );
@@ -114,41 +138,77 @@ export default function Dashboard() {
114
138
 
115
139
  ## 📊 Available Charts
116
140
 
117
- ### Core Widgets
118
- - **KPI** - Display key metrics with trends and formatting
119
- - **Gauge** - Circular or semi-circular gauge charts
120
- - **Progress** - Linear progress bars with variants
121
- - **Sparkline** - Minimal inline charts
122
-
123
- ### Line & Area Charts
124
- - **LineChart** - Single or multi-line charts
125
- - **AreaChart** - Filled area charts
126
- - **MultiLineSparkline** - Compact multi-line visualization
127
-
128
- ### Bar Charts
129
- - **BarChart** - Vertical bar charts
130
- - **HorizontalBarChart** - Horizontal bar charts
131
- - **StackedBarChart** - Stacked bar visualization
132
- - **GroupedBarChart** - Side-by-side bars
133
- - **WaterfallChart** - Cumulative change visualization
134
-
135
- ### Distribution & Comparison
136
- - **PieChart** - Pie and donut charts
137
- - **FunnelChart** - Conversion funnel visualization
138
- - **Histogram** - Distribution frequency charts
139
- - **BoxPlot** - Statistical box and whisker plots
140
-
141
- ### Scientific & Advanced
142
- - **ScatterPlot** - X-Y scatter charts with optional bubbles
143
- - **BubbleChart** - Multi-dimensional bubble visualization
144
- - **Heatmap** - Grid-based heat intensity maps
145
- - **RadarChart** - Multi-axis spider charts
146
- - **CandlestickChart** - Financial OHLC charts
147
-
148
- ### Hierarchical & Flow
149
- - **Treemap** - Hierarchical rectangle visualization
150
- - **SunburstChart** - Radial hierarchical charts
151
- - **SankeyDiagram** - Flow and relationship visualization
141
+ ### Widget Showcase
142
+
143
+ <table>
144
+ <tr>
145
+ <td align="center" width="50%">
146
+ <img src="https://raw.githubusercontent.com/chvvkrishnakumar/react-native-metrify/main/docs/images/widgets/core-widgets.png" width="400" alt="Core Widgets"/><br/>
147
+ <b>Core Widgets</b><br/>
148
+ <sub>KPI Gauge Progress Sparkline</sub>
149
+ </td>
150
+ <td align="center" width="50%">
151
+ <img src="https://raw.githubusercontent.com/chvvkrishnakumar/react-native-metrify/main/docs/images/widgets/line-area-charts.png" width="400" alt="Line & Area Charts"/><br/>
152
+ <b>Line & Area Charts</b><br/>
153
+ <sub>LineChart AreaChart MultiLineSparkline</sub>
154
+ </td>
155
+ </tr>
156
+ <tr>
157
+ <td align="center" width="50%">
158
+ <img src="https://raw.githubusercontent.com/chvvkrishnakumar/react-native-metrify/main/docs/images/widgets/bar-charts.png" width="400" alt="Bar Charts"/><br/>
159
+ <b>Bar Charts</b><br/>
160
+ <sub>BarChart HorizontalBarChart StackedBarChart</sub>
161
+ </td>
162
+ <td align="center" width="50%">
163
+ <img src="https://raw.githubusercontent.com/chvvkrishnakumar/react-native-metrify/main/docs/images/widgets/bar-charts-2.png" width="400" alt="More Bar Charts"/><br/>
164
+ <b>More Bar Charts</b><br/>
165
+ <sub>GroupedBarChart Histogram • WaterfallChart</sub>
166
+ </td>
167
+ </tr>
168
+ <tr>
169
+ <td align="center" width="50%">
170
+ <img src="https://raw.githubusercontent.com/chvvkrishnakumar/react-native-metrify/main/docs/images/widgets/distribution-charts.png" width="400" alt="Distribution Charts"/><br/>
171
+ <b>Distribution Charts</b><br/>
172
+ <sub>PieChart FunnelChart</sub>
173
+ </td>
174
+ <td align="center" width="50%">
175
+ <img src="https://raw.githubusercontent.com/chvvkrishnakumar/react-native-metrify/main/docs/images/widgets/scientific-charts.png" width="400" alt="Scientific Charts"/><br/>
176
+ <b>Scientific Charts</b><br/>
177
+ <sub>ScatterPlot • BubbleChart • Heatmap</sub>
178
+ </td>
179
+ </tr>
180
+ <tr>
181
+ <td align="center" width="50%">
182
+ <img src="https://raw.githubusercontent.com/chvvkrishnakumar/react-native-metrify/main/docs/images/widgets/advanced-charts.png" width="400" alt="Advanced Charts"/><br/>
183
+ <b>Advanced Charts</b><br/>
184
+ <sub>RadarChart • CandlestickChart</sub>
185
+ </td>
186
+ <td align="center" width="50%">
187
+ <img src="https://raw.githubusercontent.com/chvvkrishnakumar/react-native-metrify/main/docs/images/widgets/treemap-sunburst-chart.png" width="400" alt="Hierarchical Charts"/><br/>
188
+ <b>Hierarchical Charts</b><br/>
189
+ <sub>Treemap • SunburstChart</sub>
190
+ </td>
191
+ </tr>
192
+ <tr>
193
+ <td align="center" colspan="2">
194
+ <img src="https://raw.githubusercontent.com/chvvkrishnakumar/react-native-metrify/main/docs/images/widgets/sankey-diagram.png" width="400" alt="Flow Diagram"/><br/>
195
+ <b>Flow Diagram</b><br/>
196
+ <sub>SankeyDiagram</sub>
197
+ </td>
198
+ </tr>
199
+ </table>
200
+
201
+ ### All Chart Types
202
+
203
+ **Bar Charts:** BarChart, HorizontalBarChart, StackedBarChart, GroupedBarChart, WaterfallChart, Histogram
204
+
205
+ **Line & Area:** LineChart, AreaChart, MultiLineSparkline
206
+
207
+ **Distribution:** PieChart, FunnelChart, BoxPlot
208
+
209
+ **Scientific:** ScatterPlot, BubbleChart, Heatmap, RadarChart, CandlestickChart
210
+
211
+ **Hierarchical:** Treemap, SunburstChart, SankeyDiagram
152
212
 
153
213
  ## 🎨 Theming
154
214
 
@@ -311,21 +371,21 @@ MIT © [Krishna Kumar](https://github.com/chvvkrishnakumar)
311
371
  ## 🔗 Links
312
372
 
313
373
  - [Documentation](https://github.com/chvvkrishnakumar/react-native-metrify#readme)
314
- - [Examples](./examples/)
374
+ - [Examples](https://github.com/chvvkrishnakumar/react-native-metrify/tree/main/examples/basic-demo)
315
375
  - [Changelog](./CHANGELOG.md)
316
376
  - [Issues](https://github.com/chvvkrishnakumar/react-native-metrify/issues)
317
377
 
318
378
  ## 💡 Examples
319
379
 
320
- Check out the [examples directory](./examples/expo-template/) for a full-featured demo app showcasing all chart types.
380
+ Check out the [examples directory](https://github.com/chvvkrishnakumar/react-native-metrify/tree/main/examples/basic-demo) for complete working examples:
321
381
 
322
- To run the example:
382
+ - **AllWidgetsDashboard.tsx** - All 24 widgets in one scrollable file
383
+ - **KPIExample.tsx** - 7 KPI variations
384
+ - **GaugeExample.tsx** - 6 Gauge variations
385
+ - **DashboardExample.tsx** - Real-world dashboard
386
+ - **API_REFERENCE.md** - Complete type reference
323
387
 
324
- ```bash
325
- cd examples/expo-template
326
- npm install
327
- npm start
328
- ```
388
+ Copy any example directly into your app and start using it!
329
389
 
330
390
  ---
331
391
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-metrify",
3
- "version": "0.1.0-alpha.2",
3
+ "version": "0.1.0-alpha.3",
4
4
  "description": "Mobile-first SVG chart library for React Native, Expo, and React Native Web",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",