Hi, intervals are generally attached to a series, so it often doesn't make much sense to have them have their own entry in the legend. This is even more true for interval roles that don't have a unique color, like line or bar intervals. You could potentially simulate legend entries by creating empty series with the color you want.
On Fri Feb 20 2015 at 11:41:14 AM Wagner <[email protected]> wrote: > Hi, > > I have this: > > dataTable.addColumn('string', 'Date'); > dataTable.addColumn('number', 'Forecast'); > dataTable.addColumn({id:'date_note', type:'string', > role:'annotation'}); > dataTable.addColumn({id:'i2', type:'number', > role:'interval'}); > dataTable.addColumn({id:'i2', type:'number', > role:'interval'}); > dataTable.addColumn({id:'i2', type:'number', > role:'interval'}); > dataTable.addColumn({id:'i2', type:'number', > role:'interval'}); > dataTable.addColumn({id:'i2', type:'number', > role:'interval'}); > dataTable.addColumn({id:'i2', type:'number', > role:'interval'}); > dataTable.addColumn({id:'i2', type:'number', > role:'interval'}); > dataTable.addColumn({id:'i2', type:'number', > role:'interval'}); > dataTable.addColumn({id:'i2', type:'number', > role:'interval'}); > dataTable.addColumn({id:'i2', type:'number', > role:'interval'}); > dataTable.addColumn({id:'i2', type:'number', > role:'interval'}); > dataTable.addColumn({id:'i2', type:'number', > role:'interval'}); > dataTable.addColumn({id:'i2', type:'number', > role:'interval'}); > dataTable.addColumn({id:'i2', type:'number', > role:'interval'}); > dataTable.addColumn({id:'i2', type:'number', > role:'interval'}); > dataTable.addColumn({id:'i2', type:'number', > role:'interval'}); > dataTable.addColumn({id:'i2', type:'number', > role:'interval'}); > dataTable.addColumn({id:'i2', type:'number', > role:'interval'}); > dataTable.addColumn('number', 'Real'); > dataTable.addColumn({id:'join', type:'boolean', > role:'certainty'}); > > and this: > > var options = { > > title: title, > titleTextStyle: {fontSize: 14, bold: true}, > tooltip: {textStyle: {fontSize: 10, bold: true}}, > interval: { 'i2': { 'style':'area', 'curveType':'function', > 'fillOpacity':0.2, 'color':'gray' }}, > legend: { position: 'right' }, > colors: ["black", "blue"], > chartArea:{ > top: 30, > width: my_width_per, > height: "65%" > }, > width: my_width, > height: my_height, > lineWidth: 2, > vAxis: { > title: 'Power (kW)', > textStyle : { > fontSize: 10, > bold: true > }, > viewWindow:{ > min:minimum > } > }, > hAxis: { > title: 'Time horizon', > slantedText: false, > slantedTextAngle: 5, > textStyle : { > fontSize: 10, > bold: true > }, > format:'dd-MM-yyyy HH:mm' > }, > backgroundColor: '#e4e4e4', //fafafa > pointSize: 3, > }; > > and the result is: > > > <https://lh6.googleusercontent.com/-Y35I4f-EKHU/VOdh8c5hOkI/AAAAAAAABUQ/aRmmXOgvec8/s1600/result.png> > > *How can I include the different gray values in the legend? Lines with > role 'interval' are not there...* > > > > > > > > > > > -- > 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 http://groups.google.com/ > group/google-visualization-api. > For more options, visit https://groups.google.com/d/optout. > -- 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 http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
