My bad, I just have to define different columns of the same type in order to see the colors. Thanks.
On Tue, Jul 7, 2009 at 12:17 PM, Chinesco <[email protected]> wrote: > I´m trying to set different colors for each column using the Java API, > but the chart only takes the first color of the array, in the example > below, both columns take "green", the second one should be yellow: > Am I doing something wrong? > > DataTable data = DataTable.create(); > data.addColumn(ColumnType.STRING, "Hours"); > data.addColumn(ColumnType.NUMBER, "Price"); > data.addRows(2); > data.setValue(0, 0, "12A-10A"); > data.setValue(0, 1, 0.2); > data.setValue(1, 0, "10A-1P"); > data.setValue(1, 1, 0.60); > Options options = Options.create(); > options.setColors(ArrayHelper.createJsArray("green","yellow")); > chart = new ColumnChart(data, options); > > Thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en -~----------~----~----~----~------~----~------~--~---
