Re: Using jqPlot library (javascript chart) with the MVP pattern

2012-07-27 Thread vandecappelle
I'm currently creating a GWT / JQplot wrapper on Google code: project name vklgraph. Still in development. see: http://code.google.com/p/vklgraph/ Regards =) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send

Re: Using jqPlot library (javascript chart) with the MVP pattern

2010-06-10 Thread Rizen
Thank you very much for this explication. However I had already added a div id=chart1/div Element into the HTML page to be sure that it was adding correctly. But I will use your method for the wrapper. After this I make two different test. First I used only the JQuery library with a simple $wnd.$

Re: Using jqPlot library (javascript chart) with the MVP pattern

2010-06-10 Thread Rizen
I'm a stupid boy... I forgot to replace ALL $.jqplot() by $wnd. $.jqplot(); It's an improvement, but now the error has changed by : com.google.gwt.core.client.JavaScriptException: (String): Improper Data Array The table works in a HTML page, so I don't know why not here :/ I'm going to

Re: Using jqPlot library (javascript chart) with the MVP pattern

2010-06-10 Thread Olivier Monaco
Because the array is bound to the sub-frame used by GWT. When you create an array using [], the Array function is called. This is the same as new Array(). Then the following condition returns true: [].constructor == Array. But, there is an Array function for each frame. If you create an array in

Re: Using jqPlot library (javascript chart) with the MVP pattern

2010-06-09 Thread Rizen
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())); }

Re: Using jqPlot library (javascript chart) with the MVP pattern

2010-06-09 Thread Olivier Monaco
Try to replace your $.jqplot by $wnd.$.jqplot. The window object where the JSNI is run is not the main window. You can access it through $wnd. Olivier On 9 juin, 11:39, Rizen vianney.dep...@gmail.com wrote: Finally I think I'm going to try with the JavaScriptObject class, cause I can cast it

Re: Using jqPlot library (javascript chart) with the MVP pattern

2010-06-09 Thread Rizen
I've already tried but it's exactly the same problem. Here is a part of the error log : [...] com.google.gwt.core.client.JavaScriptException: (ReferenceError): $ is not defined fileName: http://127.0.0.1: lineNumber: 4 stack: ()@http://127.0.0.1::4 [...] -- You received this message

Re: Using jqPlot library (javascript chart) with the MVP pattern

2010-06-09 Thread Olivier Monaco
Okay, next try (I've read your post this time ;)). You want to cast a JavaScriptObject to an Element. You can... but it's a bad idea. A Widget needs an Element because it offer some DOM manipulation. Providing a JSO may lead to strange behavior. You need to write a clean GWT wrapper around

Re: Using jqPlot library (javascript chart) with the MVP pattern

2010-06-09 Thread Rizen
I want to cast a JavaScriptObject to an Element cause I think is the best solution for the moment. Using the MVP architecture I don't know how to do that in a different way. If there is something better I will be interested as well. About the problem with $, I wrote typeof($) in FireBug's

Re: Using jqPlot library (javascript chart) with the MVP pattern

2010-06-09 Thread Olivier Monaco
For the $, maybe the library is not loaded when you try to create your chart. As I told before, you need to write a wrapper. This wrapper create the div needed by jqPlot and add an unique ID to it. This ID is used as the first argument to jqPlot JavaScript function. But you can't create your

Using jqPlot library (javascript chart) with the MVP pattern

2010-06-08 Thread Rizen
Hello, I'm creating a chart thanks to the jqplot plugin, which depends of the JQuery library. From the jqPlot website I try to implement the simple following example : public native void createChart() /*-{ line1 = [1,4,9, 16]; line2 = [25, 12.5, 6.25,