I am using the 1.1.1 release of gwt-visualization. Here is what I got so far:
final DataTable dataTable;
// creation of the data table left out ..
final Options options = Options.create();
final HorizontalAxisOptions horizontalAxisOptions = HorizontalAxisOptions.create();
horizontalAxisOptions.setShowTextEvery(1);
// ... ?
options.setHAxisOptions(horizontalAxisOptions);
LineChart lineChart = new LineChart(dataTable, options);
The
Options.set(key, value)
-method(s) generally does the job. However, instead of using the dot notation, one must create nestedOptions
objects (or create wrapper classes likeHorizontalAxisOptions
).But: There's an issue for date values.
A workaround for this might be the usage of
minorGridlines
. I suspect that I'll end up in an ugly date calculation. :-(Other suggestions?