Can watefall charts support three or more different color column

17 views
Skip to first unread message

RAJ KUMAR JHA

unread,
Oct 31, 2017, 6:57:32 AM10/31/17
to Google Visualization API
Hi All,

I am trying to use watefall charts with three different color but it supports only two color i.e. highlighted section.

Is there a way to have columns with three different color, instead of fallingColor and risingColor.

<html>
 
<head>
   
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
   
<script type="text/javascript">
      google
.charts.load('current', {'packages':['corechart']});
      google
.charts.setOnLoadCallback(drawChart);
     
function drawChart() {
       
var data = google.visualization.arrayToDataTable([
         
['Mon', 28, 28, 38, 38],
         
['Tue', 38, 38, 55, 55],
         
['Wed', 55, 55, 77, 77],
         
['Thu', 77, 77, 66, 66],
         
['Fri', 66, 66, 22, 22]
         
// Treat the first row as data.
       
], true);

       
var options = {
          legend
: 'none',
          bar
: { groupWidth: '100%' }, // Remove space between bars.
          candlestick
: {
            fallingColor
: { strokeWidth: 0, fill: '#a52714' }, // red
            risingColor
: { strokeWidth: 0, fill: '#0f9d58' }   // green
         
}
       
};

       
var chart = new google.visualization.CandlestickChart(document.getElementById('chart_div'));
        chart
.draw(data, options);
     
}
   
</script>
 
</head>
 
<body>
   
<div id="chart_div" style="width: 900px; height: 500px;"></div>
 
</body>
</html>
Reply all
Reply to author
Forward
0 new messages