No..I'm not using GWT wrapper.
Attached sample code:
import com.google.gwt.core.client.EntryPoint;import
com.google.gwt.event.dom.client.ClickEvent;import
com.google.gwt.event.dom.client.ClickHandler;import
com.google.gwt.i18n.client.DateTimeFormat;import
com.google.gwt.user.client.ui.Button;import
com.google.gwt.user.client.ui.RootPanel;import
com.google.gwt.user.client.ui.VerticalPanel;import
com.google.gwt.visualization.client.AbstractDataTable;import
com.google.gwt.visualization.client.DataTable;import
com.google.gwt.visualization.client.VisualizationUtils;import
com.google.gwt.visualization.client.visualizations.AnnotatedTimeLine;
public class GxtSample implements EntryPoint{ private VerticalPanel
chartPanel; private AnnotatedTimeLine chart; private DataTable
chartData; private AnnotatedTimeLine.Options options; public void
onModuleLoad() { Runnable onLoadCallback = new Runnable()
{ public
void run() { chartPanel =
new VerticalPanel();
chartPanel.add(createChart());
Button button = new
Button("Change", new ClickHandler() { public
void
onClick(ClickEvent event) {
updateChart(); } });
VerticalPanel vPanel = new VerticalPanel();
vPanel.add(button); vPanel.add(chartPanel);
RootPanel.get().add(vPanel); } };
VisualizationUtils.loadVisualizationApi(onLoadCallback,
AnnotatedTimeLine.PACKAGE); }
private AnnotatedTimeLine createChart() { chartData =
DataTable.create();
chartData.addColumn(AbstractDataTable.ColumnType.DATE, "Date");
chartData.addColumn(AbstractDataTable.ColumnType.NUMBER, "column11");
chartData.addColumn(AbstractDataTable.ColumnType.NUMBER, "column12");
chartData.addRows(3);
DateTimeFormat dtf = DateTimeFormat.getFormat("yyyy-MM-dd");
chartData.setValue(0, 0, dtf.parse("2009-11-21"));
chartData.setValue(0, 1, 10); chartData.setValue(0, 2, 20);
chartData.setValue(1, 0, dtf.parse("2009-11-22"));
chartData.setValue(1, 1, 11); chartData.setValue(1, 2, 21);
chartData.setValue(2, 0, dtf.parse("2009-11-23"));
chartData.setValue(2, 1, 12); chartData.setValue(2, 2, 22);
options = AnnotatedTimeLine.Options.create();
options.setDisplayAnnotations(false);
options.setDisplayZoomButtons(true);
options.setScaleType(AnnotatedTimeLine.ScaleType.ALLFIXED);
options.setLegendPosition(AnnotatedTimeLine.AnnotatedLegendPosition.SAME_ROW);
options.setAllowRedraw(true); chart = new
AnnotatedTimeLine(chartData, options, "600px", "200px"); return
chart; } private void updateChart() {
chartData.removeColumns(0,
3); chartData.addColumn(AbstractDataTable.ColumnType.DATE, "Date");
chartData.addColumn(AbstractDataTable.ColumnType.NUMBER, "newCol");
chartData.addRows(2); DateTimeFormat dtf =
DateTimeFormat.getFormat("yyyy-MM-dd"); chartData.setValue(0, 0,
dtf.parse("2009-11-21")); chartData.setValue(0, 1, 110);
chartData.setValue(1, 0, dtf.parse("2009-11-22"));
chartData.setValue(1, 1, 111); chart.draw(chartData, options); }}
On Dec 21, 1:03 pm, ChartALot <[email protected]> wrote:
> Hi,
> Are you using our GWT wrappers? can you provide a live example?
> Which columns are you removing (what do they contain)?
>
> My guess at this point is that setting the displayAnnotations to false,
> requires a different data table format.
>
> From the
> docs<http://code.google.com/apis/chart/interactive/docs/gallery/annotatedt...>
> :
> Annotation text - [*Optional string*] If a second string column exists for
> this series, the cell value will be used as additional descriptive text for
> this point. *You must set the option **displayAnnotations to true to use
> this column. *
>
> HTH
>
> On Tue, Dec 20, 2011 at 7:21 AM, Vikas Yadav <[email protected]>wrote:
>
>
>
>
>
>
>
> > Hi All,
> > To fix chart flicker problem I've set following properties for
> > "AnnotatedTimeLine.Options".
> > chartOptions.setDisplayAnnotations(false);
> > chartOptions.setAllowRedraw(true);
>
> > But in this case "chartData.removeColumn" does not work. It don't
> > remove column, it only adds new columns.
> > When I set "chartOptions.setDisplayAnnotations(true);" everything
> > works fine, but it gives flicker problem.
> > Now i'm in deadlock stage. Please help.
>
> > Thanks in advance,
> > Vikas
>
> > --
> > 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.
--
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.