1

Google visualization team released a new type of annotation visualization called AnnotationChart that currently does not have a GWT wrapper. It is meant to replace old Annotation Timeline which is plagued by issues such as these and make a transition from flash to SVG/VML.

I was wondering if anyone has used Annotation chart in GWT before and if yes, what's the easiest way to integrate it into java code?

If not, does anyone who has written wrappers for js libraries for gwt know where should I start with this?

Community
  • 1
  • 1
mzm
  • 373
  • 1
  • 6
  • 16
  • looks like you're gonna have to roll your own wrapper. the plus is after implementing it and publishing it as an opensource project, you'll be famous! – Eliran Malka Mar 04 '14 at 18:59
  • I wouldn't mind doing that, but I am really tight with time on the project that needs this so I think I will have to opt for running this as javascript inside gwt. I've made it work and it displays [this chart](https://developers.google.com/chart/interactive/docs/gallery/annotationchart) but it is not interactive at all. It behaves like an image, any ideas why and how to fix this? Thanks! – mzm Mar 04 '14 at 20:12
  • well, if you're running this as javascript inside gwt - you're wrapping it already. just create some [overlay types](http://www.gwtproject.org/doc/latest/DevGuideCodingBasicsOverlay.html) to provide the api you're gonna use. no need to wrap the entire library. – Eliran Malka Mar 04 '14 at 20:19
  • Yeah, that's true, but it seems I'm making a mistake somewhere, since the interactivity is completely lost. I used code similar to [this one](http://stackoverflow.com/questions/20738401/how-to-code-google-chart-in-gwt-using-native-javascript), where the last answer fixes the problem op had. But the chart he spoke about is not an interactive one, so this problem didn't come about. – mzm Mar 04 '14 at 20:37
  • so extract the problematic part of your code and post it as a new question - once you raise a 'real' issue, the community is more likely to respond. – Eliran Malka Mar 04 '14 at 20:51
  • 1
    Good idea, it's all [here](http://stackoverflow.com/questions/22183104/making-google-visualization-annotation-chart-to-work-in-gwt) now. – mzm Mar 04 '14 at 21:11

1 Answers1

1

If anyone else stumbles on this and needs an answer, here you can find the wrapper that I wrote for this purpose. It can be used in the same way as any other google chart classes.

mzm
  • 373
  • 1
  • 6
  • 16