@@ -17,30 +17,30 @@ class StackedBarChartScreen extends React.Component {
1717 legend : {
1818 enabled : true ,
1919 textSize : 14 ,
20- form : ' CIRCLE' ,
20+ form : " CIRCLE" ,
2121 formSize : 14 ,
2222 xEntrySpace : 30 ,
2323 yEntrySpace : 0 ,
2424 wordWrapEnabled : true ,
2525 formToTextSpace : 10 ,
26- horizontalAlignment : ' CENTER' ,
26+ horizontalAlignment : " CENTER" ,
2727 } ,
2828 data : {
2929 dataSets : [
3030 {
3131 values : [ 125 , 110 , 135 , 140 , 130 , 160 , 170 ] ,
32- label : ' Systolic' ,
32+ label : " Systolic" ,
3333 config : {
3434 drawValues : true ,
35- colors : [ processColor ( ' #E4B81D' ) ] ,
35+ colors : [ processColor ( " #E4B81D" ) ] ,
3636 } ,
3737 } ,
3838 {
3939 values : [ 80 , 75 , 60 , 85 , 90 , 95 , 105 ] ,
40- label : ' Diastolic' ,
40+ label : " Diastolic" ,
4141 config : {
4242 drawValues : true ,
43- colors : [ processColor ( ' #4166C8' ) ] ,
43+ colors : [ processColor ( " #4166C8" ) ] ,
4444 } ,
4545 } ,
4646 ] ,
@@ -54,18 +54,48 @@ class StackedBarChartScreen extends React.Component {
5454 } ,
5555 } ,
5656 xAxis : {
57- valueFormatter : [ '1 Apr' , '2 Apr' , '3 Apr' , '4 Apr' , '5 Apr' , '6 Apr' , '7 Apr' ] ,
57+ valueFormatter : [
58+ "1 Apr" ,
59+ "2 Apr" ,
60+ "3 Apr" ,
61+ "4 Apr" ,
62+ "5 Apr" ,
63+ "6 Apr" ,
64+ "7 Apr" ,
65+ ] ,
5866 granularityEnabled : true ,
5967 granularity : 1 ,
6068 axisMaximum : 7 ,
6169 axisMinimum : 0 ,
6270 centerAxisLabels : true ,
63- position : ' BOTTOM' ,
71+ position : " BOTTOM" ,
6472 avoidFirstLastClipping : true ,
6573 } ,
6674
67- yAxis : { left :{ axisMinimum : 0 , axisMaximum : 240 , drawAxisLines : false , drawGridLines : false } , right :{ axisMinimum : 0 , axisMaximum : 0 } } ,
68-
75+ yAxis : {
76+ left : {
77+ axisMinimum : 0 ,
78+ axisMaximum : 240 ,
79+ drawAxisLines : false ,
80+ drawGridLines : false ,
81+ limitLines : [ {
82+ label : 'Upper limit' ,
83+ limit : 160 ,
84+ lineWidth : 2 ,
85+ labelPosition : 'LEFT_TOP' ,
86+ valueTextColor : processColor ( 'red' ) ,
87+ lineColor : processColor ( 'red' ) ,
88+ } , {
89+ label : 'Lower limit' ,
90+ limit : 75 ,
91+ lineWidth : 2 ,
92+ labelPosition : 'RIGHT_BOTTOM' ,
93+ valueTextColor : processColor ( 'red' ) ,
94+ lineColor : processColor ( 'green' ) ,
95+ } ]
96+ } ,
97+ right : { axisMinimum : 0 , axisMaximum : 0 } ,
98+ } ,
6999 } ;
70100 }
71101
0 commit comments