@@ -34,46 +34,33 @@ const SpeedChart = (props) => {
3434 delta : { 'reference' : 3.5 , 'increasing' : { 'color' : "mistyrose" } } ,
3535 mode : "gauge+number+delta" ,
3636 gauge : { axis : { range : [ null , 8 ] } ,
37- 'tickwidth' : 1 ,
38- 'tickcolor' : "#fce38a" ,
39- 'bar' : { 'color' : "#6eb6ff" } ,
40- 'bordercolor' : "#a3de83" ,
41- 'steps' : [
42- { 'range' : [ 0 , 4 ] , 'color' : '#edf798' } ,
43- { 'range' : [ 4 , 6 ] , 'color' : '#fab57a' } ] ,
44- 'threshold' : {
45- 'line' : { 'color' : "red" , 'width' : 3.5 } ,
46- 'thickness' : 0.75 ,
47- 'value' : 7.5 }
48- } ,
37+ 'tickwidth' : 1 ,
38+ 'tickcolor' : "#fce38a" ,
39+ 'bar' : { 'color' : "#6eb6ff" } ,
40+ 'bordercolor' : "#a3de83" ,
41+ 'steps' : [
42+ { 'range' : [ 0 , 4 ] , 'color' : '#edf798' } ,
43+ { 'range' : [ 4 , 6 ] , 'color' : '#fab57a' }
44+ ] ,
45+ 'threshold' : {
46+ 'line' : { 'color' : "red" , 'width' : 3.5 } ,
47+ 'thickness' : 0.75 ,
48+ 'value' : 7.5
49+ }
50+ } ,
4951 } ] }
5052 layout = { {
5153 height : 500 ,
5254 width : 500 ,
53- paper_bgcolor : '#fffbe0'
55+ paper_bgcolor : '#fffbe0' ,
56+ legend : {
57+ orientation : 'h' ,
58+ xanchor : 'center' ,
59+ x : .5
60+ }
5461 } }
5562 />
5663 )
57-
58-
59- // const chartData = {
60- // datasets: [
61- // {
62- // label: `CPU Speed of ${props.service}`,
63- // data: yAxis,
64- // backgroundColor: [
65- // 'rgb(2, 210, 249)',
66- // ],
67- // },
68- // ],
69- // options: {
70- // },
71- // xAxisID: 'Speed',
72- // yAxisID: 'Communicaton',
73- // labels: xAxis,
74- // };
75-
76- // return <Line data={chartData} />;
7764 } ;
7865
7966 return < div > { createChart ( ) } </ div > ;
0 commit comments