title: GWT and Visualization API options
body: <p>I am making a line chart using GWT and the google Visualization API (<a href="https://code.google.com/p/gwt-google-apis/wiki/VisualizationGettingStarted" rel="nofollow">https://code.google.com/p/gwt-google-apis/wiki/VisualizationGettingStarted</a>) with the following code</p>
  
  <pre><code>import com.google.gwt.user.client.ui.SimplePanel;
  import com.google.gwt.user.client.ui.Widget;
  import com.google.gwt.visualization.client.AbstractDataTable.ColumnType;
  import com.google.gwt.visualization.client.DataTable;
  import com.google.gwt.visualization.client.visualizations.LineChart;
  import com.google.gwt.visualization.client.visualizations.LineChart.Options;
  
  public class TestPlot {
  
  Widget pie;
  static SimplePanel S;
  public Widget getLineChart() {
      S = new SimplePanel();
  
      DataTable data = DataTable.create();
      data.addColumn(ColumnType.STRING, "X");
      data.addColumn(ColumnType.NUMBER, "Chanel 1");
      data.addColumn(ColumnType.NUMBER, "Channel 2");
      data.addRows(2);
      data.setValue(0, 0, "0");
      data.setValue(0, 1, 0);
      data.setValue(0, 2, 0);
      data.setValue(1, 0, "1");
      data.setValue(1, 1, 4);
      data.setValue(1, 2, 1);
  
      Options options = Options.create();
      options.setWidth(1000);
      options.setHeight(700);
      options.setTitle("Test");
      options.setEnableTooltip(false);
      options.setPointSize(0);
  
      LineChart pie = new LineChart(data, options);
      //pie.draw(createTable2());
      S.add(pie);
      return S;
  }     
  }
  </code></pre>
  
  <p>I would like to set some options shown on <a href="https://google-developers.appspot.com/chart/interactive/docs/gallery/linechart" rel="nofollow">https://google-developers.appspot.com/chart/interactive/docs/gallery/linechart</a> that do not have a method options.setWhatever().  It seems that I need to use the options.setOption(option, value) but I can't get it to work.  For example how would I set the two lines from the above example to red and green.  I tried:</p>
  
  <pre><code>options.setOption("colors", "['red','green']");
  </code></pre>
  
  <p>but it doesn't work.</p>