Ok, as usual sending the email made me think to something to test and
effectively now it's working. The only think i changed was that now i am
using a StringFieldDef for the date instead of a DateFieldDef so maybe the
JSon library i am using is not correctly translating the date n the server
side or there is a problem whith the store when using date fields.

Regards.

On Thu, Oct 16, 2008 at 11:06 PM, nchalon <[EMAIL PROTECTED]> wrote:

>
> Hi all,
>
> I tried to modify the linechart showcase to load data from a
> JSonReader but without any luck. Here is my code:
>
>        RecordDef recordDef = new RecordDef(
>                new FieldDef[]{
>            new DateFieldDef("fordate"),
>            new FloatFieldDef("total"),
>            new FloatFieldDef("diff")
>        });
>
>        JsonReader reader = new JsonReader(recordDef);
>        reader.setRoot("root");
>        reader.setTotalProperty("totalCount");
>        store = new Store(reader);
>        store.loadJsonData("{\"root\":[{\"fordate\":{\"date\":16,\"day
> \":4,\"hours\":8,\"minutes\":14,\"month\":9,\"seconds\":10,\"time\":
> 1224137650326,\"timezoneOffset\":-120,\"year\":108},\"total\":10,\"diff
> \":10},{\"fordate\":{\"date\":16,\"day\":4,\"hours\":8,\"minutes\":
> 14,\"month\":9,\"seconds\":10,\"time\":1224137650328,\"timezoneOffset
> \":-120,\"year\":108},\"total\":20,\"diff\":10},{\"fordate\":{\"date\":
> 16,\"day\":4,\"hours\":8,\"minutes\":14,\"month\":9,\"seconds\":
> 10,\"time\":1224137650331,\"timezoneOffset\":-120,\"year\":108},\"total
> \":28,\"diff\":8},{\"fordate\":{\"date\":16,\"day\":4,\"hours\":
> 8,\"minutes\":14,\"month\":9,\"seconds\":10,\"time\":
> 1224137650333,\"timezoneOffset\":-120,\"year\":108},\"total\":40,\"diff
> \":12}],\"totalCount\":4}", false);
>        SeriesDefY[] seriesDef = new SeriesDefY[]{
>            new SeriesDefY("Total", "total"),
>            new SeriesDefY("Difference", "diff")
>        };
>        NumericAxis currencyAxis = new NumericAxis();
>        chart.setTitle("Monthly Expenses");
>        chart.setWMode("transparent");
>        chart.setStore(store);
>        chart.setSeries(seriesDef);
>        chart.setXField("fordate");
>        chart.setYAxis(currencyAxis);
>        chart.setDataTipFunction("getDataTipText");
>        chart.setExpressInstall("js/yui/assets/expressinstall.swf");
>        chart.setWidth(500);
>        chart.setHeight(400);
>
> The chart panel is displayed but no chart and the axis are completely
> displaced and with no text at all. Am i missing something ?
>
> Thanks in advance for your reply and for all the work provided on this
> library
>
> >
>


-- 
Nicolas CHALON
[EMAIL PROTECTED]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"GWT-Ext Developer Forum" 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/gwt-ext?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to