@xplortech/apollo-data 0.0.4 → 0.0.5
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/dist/apollo-data/apollo-data.esm.js +1 -1
- package/dist/apollo-data/p-2nuV5Vny.js +1 -0
- package/dist/apollo-data/p-4ac3c97c.entry.js +1 -0
- package/dist/apollo-data/p-BWkrM8dc.js +11 -0
- package/dist/apollo-data/p-b7471c12.entry.js +1 -0
- package/dist/apollo-data/p-e518baac.entry.js +1 -0
- package/dist/cjs/apollo-data-bar-chart.cjs.entry.js +314 -0
- package/dist/cjs/{apollo-data-bar-chart_2.cjs.entry.js → apollo-data-base-CxVQ-WVP.js} +1 -715
- package/dist/cjs/apollo-data-donut-chart.cjs.entry.js +408 -0
- package/dist/cjs/apollo-data-line-chart_2.cjs.entry.js +534 -0
- package/dist/cjs/apollo-data.cjs.js +1 -1
- package/dist/cjs/constants-B3weDEpc.js +5 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/apollo-data-line/apollo-data-line.js +346 -0
- package/dist/collection/components/apollo-data-scatter/apollo-data-scatter.js +329 -0
- package/dist/collection/examples/apollo-data-line.examples.js +91 -0
- package/dist/collection/examples/apollo-data-scatter.examples.js +94 -0
- package/dist/collection/examples/index.js +1 -0
- package/dist/components/apollo-data-bar-chart.js +1 -1
- package/dist/components/apollo-data-line-chart.d.ts +11 -0
- package/dist/components/apollo-data-line-chart.js +1 -0
- package/dist/components/apollo-data-scatter-chart.d.ts +11 -0
- package/dist/components/apollo-data-scatter-chart.js +1 -0
- package/dist/components/p-2nuV5Vny.js +1 -0
- package/dist/esm/apollo-data-bar-chart.entry.js +312 -0
- package/dist/esm/{apollo-data-bar-chart_2.entry.js → apollo-data-base-BWkrM8dc.js} +1 -714
- package/dist/esm/apollo-data-donut-chart.entry.js +406 -0
- package/dist/esm/apollo-data-line-chart_2.entry.js +531 -0
- package/dist/esm/apollo-data.js +1 -1
- package/dist/esm/constants-2nuV5Vny.js +3 -0
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/apollo-data-line/apollo-data-line.d.ts +244 -0
- package/dist/types/components/apollo-data-scatter/apollo-data-scatter.d.ts +329 -0
- package/dist/types/components.d.ts +86 -0
- package/dist/types/examples/apollo-data-line.examples.d.ts +12 -0
- package/dist/types/examples/apollo-data-scatter.examples.d.ts +11 -0
- package/dist/types/examples/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/examples/apollo-data-line.examples.ts +103 -0
- package/src/examples/apollo-data-scatter.examples.ts +109 -0
- package/src/examples/index.ts +2 -1
- package/dist/apollo-data/p-e6584598.entry.js +0 -11
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { LineDataItem, LineSpec } from '../components/apollo-data-line/apollo-data-line';
|
|
2
|
+
export interface LineExample {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
props: {
|
|
6
|
+
adData: LineDataItem[];
|
|
7
|
+
adSpec?: LineSpec;
|
|
8
|
+
};
|
|
9
|
+
notes?: string;
|
|
10
|
+
}
|
|
11
|
+
/** Each item has category, xValue, yValue, and optional xLabel/yLabel. When labels are omitted, numeric values are shown. */
|
|
12
|
+
export declare const lineExamples: LineExample[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ScatterDataItem, ScatterSpec } from '../components';
|
|
2
|
+
export interface ScatterExamples {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
props: {
|
|
6
|
+
adData: ScatterDataItem[];
|
|
7
|
+
adSpec?: ScatterSpec;
|
|
8
|
+
};
|
|
9
|
+
notes?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const scatterExamples: ScatterExamples[];
|
package/package.json
CHANGED
|
@@ -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
|
+
];
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { ScatterDataItem, ScatterSpec } from '../components';
|
|
2
|
+
|
|
3
|
+
// Use the component's prop types directly
|
|
4
|
+
export interface ScatterExamples {
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
props: {
|
|
8
|
+
adData: ScatterDataItem[];
|
|
9
|
+
adSpec?: ScatterSpec;
|
|
10
|
+
// Future: add event handlers when component supports them
|
|
11
|
+
// onSliceClick?: (item: ScatterDataItem) => void;
|
|
12
|
+
};
|
|
13
|
+
notes?: string; // Optional additional documentation
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const scatterExamples: ScatterExamples[] = [
|
|
17
|
+
{
|
|
18
|
+
name: 'Basic Scatter Chart',
|
|
19
|
+
description: 'A simple scatter chart using default styling and automatic tooltips.',
|
|
20
|
+
props: {
|
|
21
|
+
adData: [
|
|
22
|
+
{ category: 'A', xValue: 120, yValue: 4.5 },
|
|
23
|
+
{ category: 'B', xValue: 340, yValue: 6.8 },
|
|
24
|
+
{ category: 'C', xValue: 560, yValue: 7.2 },
|
|
25
|
+
{ category: 'A', xValue: 230, yValue: 5.1 },
|
|
26
|
+
{ category: 'B', xValue: 890, yValue: 8.4 },
|
|
27
|
+
],
|
|
28
|
+
adSpec: {
|
|
29
|
+
xAxisTitle: 'Revenue',
|
|
30
|
+
yAxisTitle: 'Rating',
|
|
31
|
+
tooltip: 'auto',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
notes: 'Uses defaultPointStyle internally. No category-based styling applied.',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: 'Category Styled Scatter',
|
|
38
|
+
description: 'Scatter chart with custom styles per category using categoryPointStyleMap.',
|
|
39
|
+
props: {
|
|
40
|
+
adData: [
|
|
41
|
+
{ category: 'Mobile', xValue: 150, yValue: 3.8 },
|
|
42
|
+
{ category: 'Web', xValue: 980, yValue: 7.9 },
|
|
43
|
+
{ category: 'Backend', xValue: 670, yValue: 6.7 },
|
|
44
|
+
{ category: 'Mobile', xValue: 300, yValue: 5.6 },
|
|
45
|
+
],
|
|
46
|
+
adSpec: {
|
|
47
|
+
xAxisTitle: 'Users',
|
|
48
|
+
yAxisTitle: 'Performance Score',
|
|
49
|
+
tooltip: 'auto',
|
|
50
|
+
categoryPointStyleMap: {
|
|
51
|
+
Mobile: { color: '#4ECDC4', size: 100, shape: 'circle' },
|
|
52
|
+
Web: { color: '#FF6B6B', size: 120, shape: 'square' },
|
|
53
|
+
Backend: { color: '#6A6D7D', size: 140, shape: 'triangle' },
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
notes: 'Each category overrides the defaultPointStyle using categoryPointStyleMap.',
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: 'Per-Point Style Override',
|
|
61
|
+
description: 'Individual data points override category and default styles.',
|
|
62
|
+
props: {
|
|
63
|
+
adData: [
|
|
64
|
+
{
|
|
65
|
+
category: 'Sales',
|
|
66
|
+
xValue: 400,
|
|
67
|
+
yValue: 6.2,
|
|
68
|
+
pointStyle: { color: '#FF0000', size: 180, shape: 'triangle' },
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
category: 'Sales',
|
|
72
|
+
xValue: 520,
|
|
73
|
+
yValue: 7.1,
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
category: 'Marketing',
|
|
77
|
+
xValue: 310,
|
|
78
|
+
yValue: 5.4,
|
|
79
|
+
pointStyle: { color: '#000000', size: 160, shape: 'square' },
|
|
80
|
+
},
|
|
81
|
+
],
|
|
82
|
+
adSpec: {
|
|
83
|
+
xAxisTitle: 'Spend',
|
|
84
|
+
yAxisTitle: 'Conversion Rate',
|
|
85
|
+
defaultPointStyle: { color: '#6A6D7D', size: 100, shape: 'circle' },
|
|
86
|
+
tooltip: 'auto',
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
notes: 'pointStyle at the data level has highest priority over category and default styles.',
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: 'Tooltip Disabled',
|
|
93
|
+
description: 'Scatter chart with tooltips disabled.',
|
|
94
|
+
props: {
|
|
95
|
+
adData: [
|
|
96
|
+
{ category: 'Q1', xValue: 200, yValue: 4.2 },
|
|
97
|
+
{ category: 'Q2', xValue: 450, yValue: 6.5 },
|
|
98
|
+
{ category: 'Q3', xValue: 700, yValue: 8.1 },
|
|
99
|
+
{ category: 'Q4', xValue: 300, yValue: 5.9 },
|
|
100
|
+
],
|
|
101
|
+
adSpec: {
|
|
102
|
+
xAxisTitle: 'Quarter',
|
|
103
|
+
yAxisTitle: 'Growth',
|
|
104
|
+
tooltip: 'none',
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
notes: 'Tooltip interaction is completely disabled in this example.',
|
|
108
|
+
},
|
|
109
|
+
];
|
package/src/examples/index.ts
CHANGED