here goes the solution!!
private OnMouseOverHandler createOverHandler(final Label lbl, final
ColumnChart colChart) {
return new OnMouseOverHandler() {
@Override
public void onMouseOverEvent(OnMouseOverEvent event){
lbl.setText("!!!!!!!!Mouse moved over!!!!!");
JsArray<Selection> jsarray =
(JsArray<Selection>)JsArray.createArray();
jsarray.push(Selection.createCellSelection(event.getRow(),
event.getColumn()));
colChart.setSelections(jsarray);
}
This works!
Thanks
Ankit
On Mar 16, 5:09 pm, Anky <[email protected]> wrote:
> One more thing...
> I tried the mouseover handler but how can we create a Selection out of
> the mouseover event object?
>
> private OnMouseOverHandler createOverHandler(final Label lbl, final
> ColumnChart colChart) {
> return new OnMouseOverHandler() {
> @Override
> public void onMouseOverEvent(OnMouseOverEvent event) {
> // create a selection from the
> SelectionHelper.java available in
> google trunk
> /
> *http://www.google.com/codesearch/p?hl=en#ow6Lmd7dcZY/trunk/
> visualization/visualization/src/com/google/gwt/visualization/client/
> SelectionHelper.java&q=google/gwt/visualization/client/Properties
> %20package:http://gwt-google-apis%5C.googlecode%5C.com&d=9*/
> Selection sel=
> SelectionHelper.createSelection(event.getRow(),
> event.getColumn());
> SelectionHelper.setSelection(colChart, sel);
>
> lbl.setText("!!!!!!!!Mouse moved
> over!!!!!");// this get displayed
> }
> };
> }
>
> Any help would be really appreciated
>
> Thanks again!
> Ankit
>
> On Mar 16, 10:30 am, Anky <[email protected]> wrote:
>
>
>
> > Hey Vizzy,
>
> > thanks for your reply.
>
> > I have one more question. Is there any way to remove a registered
> > handler from a chart component?
> > My idea is to add a new handler on some user action. When I register a
> > new select handler for this chart, it adds up this new event in a list
> > of select events for the same chart hence causing the select event to
> > get triggered first for the earlier registered event and then the new
> > select event on the same user action.
>
> > Thanks
> > Ankit
>
> > On Mar 15, 11:16 am, MC Get Vizzy <[email protected]> wrote:
>
> > > On Sat, Mar 13, 2010 at 1:40 AM, Anky <[email protected]> wrote:
> > > > Hi,
>
> > > > I am creating a small app using GWT and Google visualization API.
>
> > > > The API documentation
> > > >http://code.google.com/apis/visualization/documentation/gallery/colum...
> > > > says the we can set the stacked feature for the column chart, but the
> > > > latest visualization jar at
> > > >http://code.google.com/p/gwt-google-apis/downloads/list
> > > > does not include the stacked feature.
>
> > > that's strange, I am looking at version 0.0.0, and I see the following in
> > > ColumnChart.java:
>
> > > public final native void setStacked(boolean stacked) /*-{
> > > this.isStacked = stacked;
> > > }-*/;
>
> > > (this is a method of ColumnChart.Options.) the same thing appears in
> > > 1.0.2.
>
> > > There are few more.
>
> > > > please suggest if I am referring to the older jar version. (gwt-
> > > > visualization-1.0.2.zip)
>
> > > there are some options that are not explicitly supported yet. you can
> > > access those by calling the set() method on the options object. there are
> > > overloads for the different option value types. for example:
>
> > > ColumnChart.Options options = new ColumnChart.Options();
> > > options.set("axisFontSize", 5);
>
> > > > Also, I would be thankful to you all if any one can give me some hint
> > > > to show up the tool tip on mouse over event.
>
> > > see ColumnChart.addOnMouseOverHandler().
>
> > > I hope this helps -- let me know if you have more questions.
>
> > > > Thanks
> > > > Ankit
>
> > > > --
> > > > 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]<google-visualization-api%[email protected]>
> > > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/google-visualization-api?hl=en.-Hidequoted
> > > > text -
>
> > > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--
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.