Have you tried using a null value instead of 0? On Tue, Aug 9, 2016 at 5:12 AM, virendra chaudhary < [email protected]> wrote:
> I want to create Stacked Column Chart which should not display anything > related to a entity whose count is zero. > > I am using below html code. It is displaying a red line on top of green > bar even if count is zero for the entity related to red(Failed). I want to > remove this line. > > Please help me. > > <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', 'bar']}); > google.charts.setOnLoadCallback(drawStacked); > > function drawStacked() { > var data = google.visualization.arrayToDataTable([ > ['Genre','Passed', 'Failed', { role: 'annotation' } ], > ['DashBoard', 10, 0, ''], > > ]); > > var options = { > width: 600, > height: 400, > legend: { position: 'top', maxLines: 3 }, > bar: { groupWidth: '75%' }, > colors:["green","red","black"], > isStacked: true > }; > > var chart = new google.visualization.ColumnChart(document. > getElementById('chart_div')); > chart.draw(data, options); > } > </script> > </head> > <body> > <div id="chart_div"></div> > </body> > </html> > > > > Many Thanks! > > -- > You received this message because you are subscribed to the Google Groups > "Google Visualization API" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to google-visualization-api@ > googlegroups.com. > Visit this group at https://groups.google.com/ > group/google-visualization-api. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/google-visualization-api/098b753c-adbd-4caf-a30f- > d6b5e5b38b51%40googlegroups.com > <https://groups.google.com/d/msgid/google-visualization-api/098b753c-adbd-4caf-a30f-d6b5e5b38b51%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2> [email protected] <[email protected]> 5CC, Cambridge MA -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-visualization-api. To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/CAOtcSJO5%2BLsQs9MGrh2%2BNZ5XPqVhHdvrJLcPXnWKDBPD576_tw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
