Skip to content

Commit 04d44bf

Browse files
authored
Merge pull request #2 from hunterg325/add-react-wrapper
Refactor LineChartExample for simpler line series configuration
2 parents d284d33 + 3758a27 commit 04d44bf

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

examples/main.tsx

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function LineChartExample() {
88
const [error, setError] = useState<string | null>(null);
99

1010
// Generate sample data
11-
const generateLineData = useCallback((points: number = 5000000) => {
11+
const generateLineData = useCallback((points: number = 10000) => {
1212
const data = [];
1313
for (let i = 0; i < points; i++) {
1414
const x = i;
@@ -22,23 +22,13 @@ function LineChartExample() {
2222
series: [
2323
{
2424
type: 'line',
25-
name: 'Sample Line Series',
2625
data: generateLineData(),
27-
lineStyle: {
28-
width: 2,
29-
color: '#667eea',
30-
},
31-
areaStyle: {
32-
color: 'rgba(102, 126, 234, 0.2)',
33-
},
26+
},
27+
{
28+
type: 'line',
29+
data: generateLineData(),
3430
},
3531
],
36-
xAxis: {
37-
type: 'value',
38-
},
39-
yAxis: {
40-
type: 'value',
41-
},
4232
grid: {
4333
left: 60,
4434
right: 40,

0 commit comments

Comments
 (0)