Skip to content
This repository was archived by the owner on Aug 19, 2024. It is now read-only.

Commit 0f2bc3e

Browse files
committed
AG-5881 Add Vue3 support to Standalone Charts
1 parent 3bd1e6a commit 0f2bc3e

File tree

1 file changed

+6
-17
lines changed

1 file changed

+6
-17
lines changed

src/App.js

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,6 @@ import React, {useState} from 'react';
22
import {AgChartsReact} from 'ag-charts-react';
33
import './App.css';
44

5-
/*
6-
const NumericInput = initialValue => {
7-
const [value, setValue] = useState(initialValue);
8-
const onChange = (
9-
event => setValue(isNaN(event.currentTarget.value) ? initialValue : parseInt(event.currentTarget.value))
10-
);
11-
12-
return {value, onChange};
13-
};
14-
*/
15-
165
const IncreaseDecreaseInput = (label, initialValue) => {
176
const [value, setValue] = useState(initialValue);
187
return {
@@ -36,7 +25,7 @@ const IncreaseDecreaseInput = (label, initialValue) => {
3625

3726

3827
function App() {
39-
const {value: markerSize, control: MarkerSizeControl} = IncreaseDecreaseInput("Marker Size", 25);
28+
const {value: markerSize, control: MarkerSizeControl} = IncreaseDecreaseInput("Marker Size", 10);
4029

4130
return (
4231
<div>
@@ -62,11 +51,11 @@ function App() {
6251
}],
6352
series: [{
6453
xKey: 'month',
65-
yKey: 'revenue'
66-
}],
67-
legend: {
68-
markerSize: markerSize
69-
}
54+
yKey: 'revenue',
55+
marker: {
56+
size: markerSize
57+
}
58+
}]
7059
}}
7160
/>
7261
</div>

0 commit comments

Comments
 (0)