Thanks for the idea.  I tried it out and it seems like it would work
except that the bars seems be overlap a bit.

In the example below the bars have width of 53px but are positioned
52px apart.  When they're solid bars it's not really noticeable but
with semi-transparent images you notice it right away when they
overlap a bit.

Following is the test code inside my EntryPoint:

    public void onModuleLoad() {

        GChart.setBlankImageURL(GWT.getModuleBaseURL()
+GChart.DEFAULT_BLANK_IMAGE_URL);

        GChart gchart = new GChartExample01();
        gchart.update();

        RootPanel.get().add(gchart);

    }

    static class GChartExample01 extends GChart {

        GChartExample01() {

            setChartSize(990, 200);
            setHoverTouchingEnabled(false);

            long numberOfPoints = 20;

            addCurve();

            getCurve().getSymbol().setSymbolType
(GChart.SymbolType.VBAR_SOUTH);
            getCurve().getSymbol().setBackgroundColor("green");
            getCurve().getSymbol().setModelWidth(1.0);
            getCurve().getSymbol().setBorderWidth(0);

            for (int i = 0; i < numberOfPoints; i++) {
                getCurve().addPoint(i, Random.nextInt(4000));
            }

            addCurve();
            getCurve().getSymbol().setSymbolType
(GChart.SymbolType.VBAR_SOUTH);
            getCurve().getSymbol().setBackgroundColor("blue");
            getCurve().getSymbol().setModelWidth(1.0);
            getCurve().getSymbol().setBorderWidth(0);

            for (int i = 0; i < numberOfPoints; i++) {
                getCurve().addPoint(i, Random.nextInt(4000));
            }


            getXAxis().setHasGridlines(false);

        }
    }


On Feb 12, 3:18 am, John Gunther <[email protected]> wrote:
> I noticed this is your very first post to any Google forum. Welcome.
>
> GChart2.4 has a built-in single point selection capability. Here's an
> example of how to use that:
>
> http://gchart.googlecode.com/svn/trunk/doc/com/googlecode/gchart/clie...
>
> To emulate multiple selection, you could add a second curve that had
> the same symbol type (and other properties such as width) as the first
> (so that it would overlay it) but only included the points (bars) you
> wanted to be selected. The setImageURL method could then be applied to
> this second curve, passing in your semi-transparent image.
>
> Selection/deselection would then be a matter of adding/removing points
> to/from this second curve, and calling the update method to refresh
> the chart.
>
> John C. Guntherhttp://gchart.googlecode.com
>
> On Feb 11, 1:38 pm, Paul Wang <[email protected]> wrote:
>
> > Hi,
>
> > I'd like to put a semi-transparent panel on top of agchartto show
> > disabled areas of a bar graph.  I looked throughgchart2.4 and didn't
> > see anything that'd let me easily find out where bars are located so I
> > can position a panel on top of it.
>
> > Is there a better way to do this?  I also need to do this without any
> > user input (no events).
>
> > --
> > Paul Wang
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to