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

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 (3) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +32 -16
  3. package/package.json +2 -3
package/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [0.1.0-alpha.4] - 2026-01-22
6
+
7
+ ### Fixed
8
+ - Corrected documentation examples to match actual API implementation
9
+ - Fixed KPI, Gauge, LineChart, BarChart, PieChart, AreaChart, Sparkline, and Progress widget examples
10
+ - All widget examples now correctly show `data={{}}` prop pattern instead of flat props
11
+ - Removed invalid `expo-template` reference from package.json scripts
12
+
5
13
  ## [0.1.0] - 2026-01-21
6
14
 
7
15
  ### Added
package/README.md CHANGED
@@ -269,12 +269,14 @@ interface BaseWidgetProps {
269
269
 
270
270
  ```tsx
271
271
  <KPI
272
- value={1234}
273
- label="Revenue"
274
- trend={12.5} // Percentage change
275
- format="currency" // 'number' | 'currency' | 'percentage'
276
- currency="USD" // Currency code for formatting
277
- precision={2} // Decimal places
272
+ data={{
273
+ value: 1234,
274
+ label: "Revenue",
275
+ trend: 12.5, // Percentage change
276
+ format: "currency", // 'number' | 'currency' | 'percentage'
277
+ currency: "USD", // Currency code for formatting
278
+ precision: 2, // Decimal places
279
+ }}
278
280
  width={200}
279
281
  />
280
282
  ```
@@ -283,13 +285,23 @@ interface BaseWidgetProps {
283
285
 
284
286
  ```tsx
285
287
  <LineChart
286
- data={[10, 25, 15, 40, 30]}
287
- labels={['Jan', 'Feb', 'Mar', 'Apr', 'May']}
288
+ data={{
289
+ series: [
290
+ {
291
+ data: [
292
+ { x: 0, y: 10 },
293
+ { x: 1, y: 25 },
294
+ { x: 2, y: 15 },
295
+ { x: 3, y: 40 },
296
+ { x: 4, y: 30 },
297
+ ],
298
+ color: "#007AFF",
299
+ label: "Sales",
300
+ },
301
+ ],
302
+ }}
288
303
  width={300}
289
304
  height={200}
290
- curved={true} // Use curved lines
291
- showGrid={true} // Show background grid
292
- showPoints={true} // Show data points
293
305
  />
294
306
  ```
295
307
 
@@ -297,14 +309,18 @@ interface BaseWidgetProps {
297
309
 
298
310
  ```tsx
299
311
  <Gauge
300
- value={75}
301
- min={0}
302
- max={100}
312
+ data={{
313
+ value: 75,
314
+ max: 100,
315
+ label: "Progress",
316
+ unit: "%",
317
+ }}
303
318
  width={200}
304
319
  height={200}
305
- variant="semi" // 'full' | 'semi'
320
+ startAngle={-120} // Start angle in degrees
321
+ endAngle={120} // End angle in degrees
306
322
  showValue={true}
307
- unit="%"
323
+ showLabel={true}
308
324
  />
309
325
  ```
310
326
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-metrify",
3
- "version": "0.1.0-alpha.3",
3
+ "version": "0.1.0-alpha.4",
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",
@@ -26,8 +26,7 @@
26
26
  "clean": "rm -rf dist",
27
27
  "prepublishOnly": "npm run clean && npm run build",
28
28
  "dev": "tsc --project tsconfig.build.json --watch",
29
- "pack:test": "npm pack --dry-run",
30
- "example": "cd examples/expo-template && npm start"
29
+ "pack:test": "npm pack --dry-run"
31
30
  },
32
31
  "keywords": [
33
32
  "react-native",