This repository was archived by the owner on Aug 19, 2024. It is now read-only.
File tree 1 file changed +6
-17
lines changed 1 file changed +6
-17
lines changed Original file line number Diff line number Diff line change @@ -2,17 +2,6 @@ import React, {useState} from 'react';
2
2
import { AgChartsReact } from 'ag-charts-react' ;
3
3
import './App.css' ;
4
4
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
-
16
5
const IncreaseDecreaseInput = ( label , initialValue ) => {
17
6
const [ value , setValue ] = useState ( initialValue ) ;
18
7
return {
@@ -36,7 +25,7 @@ const IncreaseDecreaseInput = (label, initialValue) => {
36
25
37
26
38
27
function App ( ) {
39
- const { value : markerSize , control : MarkerSizeControl } = IncreaseDecreaseInput ( "Marker Size" , 25 ) ;
28
+ const { value : markerSize , control : MarkerSizeControl } = IncreaseDecreaseInput ( "Marker Size" , 10 ) ;
40
29
41
30
return (
42
31
< div >
@@ -62,11 +51,11 @@ function App() {
62
51
} ] ,
63
52
series : [ {
64
53
xKey : 'month' ,
65
- yKey : 'revenue'
66
- } ] ,
67
- legend : {
68
- markerSize : markerSize
69
- }
54
+ yKey : 'revenue' ,
55
+ marker : {
56
+ size : markerSize
57
+ }
58
+ } ]
70
59
} }
71
60
/>
72
61
</ div >
You can’t perform that action at this time.
0 commit comments