Thank, good to know what you were trying to do. Unfortunately, there are not specific tools in GChart that do the drag-selection rectangle thing, or let you highlight more than a single point. There are "poor man's" ways to do similar things. You might let the user click in the upper left, then lower right, and use the two clicks to define the rectangle. Not quite the same, I know, but doable via the new ClickEvents support. You could add a curve with one point (BOX_SOUTHEAST) and manipulate width and height to draw the selection rectangle after the second click. You might also try using Annotations (which can be widgets centered on the point which overwrite it, for example) on each selected point to represent that fact that they are selected.
John On Feb 2, 8:54 am, saurabh hirani <[email protected]> wrote: > Hi John, > > > Just added a new example chart titled "World's Simplest Line Chart > > Editor" that shows you how to add points to a Client-sideGChartcurve > > by clicking on empty space on the chart (you'll need to download the > > latest v2.4 version of Cllient-sideGChartto use this code): > > > Code:http://gchart.googlecode.com/svn/trunk/gcharttestapp/src/com/googleco... > > Screen-shot:http://gchart.googlecode.com/svn/trunk/gchart/src/com/googlecode/gcha... > > Thanks a lot for providing such a thorough explanation of how this can > be done. I really appreciate your putting in time to answer these > queries. I will download 2.4 and check it out. > > Basically, I wanted to do this because I wanted to highlight an area > of an already drawn chart. In the meantime, while I could not know how > to do this, I had checked out orkut's photo-tagging feature which > allows us to draw a rectangle over an already existing image. While I > implemented drawing a rectangle over an image using GWT with client > cordinates, I realized that it fails when my image is larger than my > browser window. Because as I scroll down or on the side my client > cordinates with respect to a reference point at the top are lost. As > in, my image's top left edge whose cordinate was say (20, 100) before > I scroll is no longer in the frame and (20, 100) becomes the cordinate > of the point at the top left of the browser window which is not the > top left edge but a portion of the image which came into picture when > I scrolled down. I saw that you are using clientX and clientY. So I > thought maybe this information would be useful. > > I don't know if I could communicate my thoughts clearly. But I will > check out your code and I have put in an enhancement request on > theGChartissue tracker. > > regards, > Saurabh Hirani. > [email protected] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" 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-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
