Finally I think I'm going to try with the JavaScriptObject class,
cause I can cast it in Element object.

public class CallChartView extends Widget implements
CallChartPresenter.Display {

        public CallChartView() {
                setElement(Element.as(createChart()));
        }

        public native JavaScriptObject createChart() /*-{
                line1 = [1,4,9, 16];
                line2 = [25, 12.5, 6.25, 3.125];

                plot = $.jqplot('chart1', [line1, line2], {
                       legend:{show:true, location:'ne'},title:'Bar
Chart',
                       series:[
                             {label:'Profits', renderer:
$.jqplot.BarRenderer},
                             {label:'Expenses', renderer:
$.jqplot.BarRenderer}
                       ],
                       axes:{
                             xaxis:{renderer:$.jqplot.CategoryAxisRenderer},
                             yaxis:{min:0}
                       }
                });
                return plot;
        }-*/;
}

But now I have an error from the GWT console : "$ is not defined". I
have already tried to change the javascript configuration but the
problem is always present.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to