@xplortech/apollo-data 0.0.3-draft.f8f65f7 → 0.0.4-draft.64ed229

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xplortech/apollo-data",
3
- "version": "0.0.3-draft.f8f65f7",
3
+ "version": "0.0.4-draft.64ed229",
4
4
  "description": "Apollo Data",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -0,0 +1,103 @@
1
+ import { LineDataItem, LineSpec } from '../components/apollo-data-line/apollo-data-line';
2
+
3
+ export interface LineExample {
4
+ name: string;
5
+ description: string;
6
+ props: {
7
+ adData: LineDataItem[];
8
+ adSpec?: LineSpec;
9
+ };
10
+ notes?: string;
11
+ }
12
+
13
+ /** Each item has category, xValue, yValue, and optional xLabel/yLabel. When labels are omitted, numeric values are shown. */
14
+ export const lineExamples: LineExample[] = [
15
+ {
16
+ name: 'Revenue and Expenses by Day',
17
+ description: 'Line chart showing daily revenue and expenses over a week',
18
+ props: {
19
+ adData: [
20
+ { category: 'Revenue', xValue: 1, yValue: 5000, xLabel: 'Mon' },
21
+ { category: 'Expenses', xValue: 1, yValue: 2000, xLabel: 'Mon' },
22
+ { category: 'Revenue', xValue: 2, yValue: 6000, xLabel: 'Tue' },
23
+ { category: 'Expenses', xValue: 2, yValue: 2500, xLabel: 'Tue' },
24
+ { category: 'Revenue', xValue: 3, yValue: 5500, xLabel: 'Wed' },
25
+ { category: 'Expenses', xValue: 3, yValue: 2200, xLabel: 'Wed' },
26
+ { category: 'Revenue', xValue: 4, yValue: 7000, xLabel: 'Thu' },
27
+ { category: 'Expenses', xValue: 4, yValue: 3000, xLabel: 'Thu' },
28
+ { category: 'Revenue', xValue: 5, yValue: 6500, xLabel: 'Fri' },
29
+ { category: 'Expenses', xValue: 5, yValue: 2800, xLabel: 'Fri' },
30
+ ],
31
+ adSpec: {
32
+ tooltipPrefix: '$',
33
+ currencySymbol: '$',
34
+ yAxisTitle: 'Amount',
35
+ colorSet: ['#FF8DF4', '#74FBD0'],
36
+ },
37
+ },
38
+ },
39
+ {
40
+ name: 'Monthly Sales by Product',
41
+ description: 'Multi-line chart showing sales across products by month',
42
+ props: {
43
+ adData: [
44
+ { category: 'Product A', xValue: 1, yValue: 12000, xLabel: 'Jan' },
45
+ { category: 'Product B', xValue: 1, yValue: 8000, xLabel: 'Jan' },
46
+ { category: 'Product C', xValue: 1, yValue: 6000, xLabel: 'Jan' },
47
+ { category: 'Product A', xValue: 2, yValue: 15000, xLabel: 'Feb' },
48
+ { category: 'Product B', xValue: 2, yValue: 9000, xLabel: 'Feb' },
49
+ { category: 'Product C', xValue: 2, yValue: 7000, xLabel: 'Feb' },
50
+ { category: 'Product A', xValue: 3, yValue: 13000, xLabel: 'Mar' },
51
+ { category: 'Product B', xValue: 3, yValue: 10000, xLabel: 'Mar' },
52
+ { category: 'Product C', xValue: 3, yValue: 5500, xLabel: 'Mar' },
53
+ { category: 'Product A', xValue: 4, yValue: 14000, xLabel: 'Apr' },
54
+ { category: 'Product B', xValue: 4, yValue: 9500, xLabel: 'Apr' },
55
+ { category: 'Product C', xValue: 4, yValue: 6500, xLabel: 'Apr' },
56
+ ],
57
+ adSpec: {
58
+ tooltipPrefix: '$',
59
+ currencySymbol: '$',
60
+ yAxisTitle: 'Monthly Sales',
61
+ colorSet: ['#FF8DF4', '#74FBD0', '#ECFD91'],
62
+ },
63
+ },
64
+ },
65
+ {
66
+ name: 'Single Series',
67
+ description: 'Line chart with one category (visitors over time)',
68
+ props: {
69
+ adData: [
70
+ { category: 'Visitors', xValue: 1, yValue: 2450, xLabel: 'Mon' },
71
+ { category: 'Visitors', xValue: 2, yValue: 2680, xLabel: 'Tue' },
72
+ { category: 'Visitors', xValue: 3, yValue: 2320, xLabel: 'Wed' },
73
+ { category: 'Visitors', xValue: 4, yValue: 2890, xLabel: 'Thu' },
74
+ { category: 'Visitors', xValue: 5, yValue: 3150, xLabel: 'Fri' },
75
+ { category: 'Visitors', xValue: 6, yValue: 3420, xLabel: 'Sat' },
76
+ { category: 'Visitors', xValue: 7, yValue: 3280, xLabel: 'Sun' },
77
+ ],
78
+ adSpec: {
79
+ yAxisTitle: 'Daily Visitors',
80
+ colorSet: ['#6366f1'],
81
+ },
82
+ },
83
+ },
84
+ {
85
+ name: 'Custom Axis Titles',
86
+ description: 'Line chart with custom x-axis and y-axis titles',
87
+ props: {
88
+ adData: [
89
+ { category: 'Inbound', xValue: 1, yValue: 120, xLabel: 'Mon' },
90
+ { category: 'Outbound', xValue: 1, yValue: 80, xLabel: 'Mon' },
91
+ { category: 'Inbound', xValue: 2, yValue: 95, xLabel: 'Tue' },
92
+ { category: 'Outbound', xValue: 2, yValue: 110, xLabel: 'Tue' },
93
+ { category: 'Inbound', xValue: 3, yValue: 130, xLabel: 'Wed' },
94
+ { category: 'Outbound', xValue: 3, yValue: 70, xLabel: 'Wed' },
95
+ ],
96
+ adSpec: {
97
+ yAxisTitle: 'Calls',
98
+ xAxisTitle: 'Support queue (by day)',
99
+ colorSet: ['#4d1ab2', '#f99170'],
100
+ },
101
+ },
102
+ },
103
+ ];
@@ -1,2 +1,3 @@
1
1
  export * from './apollo-data-donut.examples';
2
- export * from './apollo-data-bar.examples';
2
+ export * from './apollo-data-bar.examples';
3
+ export * from './apollo-data-line.examples';