javascript - Highcharts fill bar background -


hi guys have highcharts graph stacked bar , trying give chart effect being filled, thermometer. when chart draws red , gray bars push right. there way can set gray bar shows right away on page load, , red bar fills gray bar? thanks

http://jsfiddle.net/jimbob25/l974t/

 series: [{         name: 'null',         data: [5, 69, 86, 75, 48],         borderradius: 5,         color: "gray"     }, {         name: 'values',         data: [95, 31, 14, 25, 62],         color: "red",         borderradius: 5     }] 

update, first bar in following link http://jsfiddle.net/l974t/3/

you can see first bar grey, can make rest gray , fine, bars not scale based off of resolution

here can do:

  • add 1 more series, different stack (as background) - animation series should disabled (duplicated of gray one)
  • change color right-hand series transparent

and here working code: http://jsfiddle.net/l974t/4/

    series: [{         name: 'null',         data: [5, 69, 86, 75, 48],         borderwidth: 0,         color: "rgba(0,0,0,0)"     }, {         name: 'null',         data: [5, 69, 86, 75, 48],         borderwidth: 0,         stack: 1,         animation: false,         color: "gray"     }, {         name: 'values',         data: [95, 31, 14, 25, 62],         color: "red",         borderwidth: 0,         borderradius: 5     }] 

Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -