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

--~--~---------~--~----~------------~-------~--~----~
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