• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

GWT Chart which displays bars on x axis at irregular intervals

Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to create various charts (using GWT) which will display values along the x axis at irregular intervals.
All examples I have come across (and testing I have done) display the values along the x axis at regular intervals.
However for my purposes I need to display a set of values (Y axis) taken at specific times/java.util.Date (X axis).
The range of the x axis can be varied from 1 month to n months and the labels must show the Months. The values however must be displayed at the appropriate place on the x axis (see screen shots).

Does anyone have any idea how to achieve this using the GWT charts?
[Thumbnail for 1-mnth.png]
Range of 1 month
[Thumbnail for 6-mnths.png]
Range of 6 months
[Thumbnail for 12-months.png]
Range of 12 months
Posts: 11445
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

In the past I have used the Visualization API to generate charts and graphs for my GWT apps.
A sampler of what all is possible can be found here
Louise Moritmer
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for the quick reply Maneesh.

I have looked at the Visualization API but i believe the same problem exists.

I realise I may not have made the actual problem clear in the initial post but it is this:
in the examples I have seen, when drawing a simple column grid (for example), the bars are drawn from the x grid at REGULAR intervals for each entry supplied (Jan, Feb, March) (Java, C++, Prolog)

However, I need to display an x grid which, while marking the intervals along the x axis as months (Jan, Feb, etc), will display the Bars themselves at points along the x axis which reflect the actual java.util.Date when the value was measured.

So there may be no Bars during Jan and yet 20 Bars in May!

Does the Visualisation API allow this? I didn't see it.
Can you point me to some example code?

Many thanks
Don't touch me. And dont' touch this tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic