-
29 Apr 2010 12:53 AM #111
great stuff, Daniël. works perfect!
-
10 May 2010 12:15 AM #112
When I remove a record from store, the firebug says
"this.getxAxisData is not a function
[Break on this error] this.chart.xAxis[0].setCategories(this.getxAxisData(), true);
Ext.ux...hart.js (第 503 行)",
this.getxAxisData() is not defined!
-
10 May 2010 12:50 PM #113
@Buz: Got a small question: I want to do a spline chart. Is it possible to pass the x + y coordinates with a store?
something like this:
Code:var store = new Ext.data.JsonStore({ fields:['point'], root: "", data: [{ "point": ['test', 3]},{ "point": ['test2', 4]},{ "point": ['test3', 5]},{ "point": ['test4', 6]}] });
-
11 May 2010 1:40 AM #114
How do I configure Ext.ux.HighChart which has a dynamic series loaded from json?
Here is my chart configuration using a static data:
you can look how this chart looks like in the attachmentCode:var myChart = new Ext.ux.HighChart({ id: 'myChart' ,chartConfig: { chart: { defaultSeriesType: 'column' } ,title: { text: 'My Chart' } ,xAxis: { categories: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] ,title: { enabled: true ,text: 'Date' } } ,yAxis: { title: { text: 'Total' } } ,plotOptions: { column: { stacking: 'normal' } } ,series: [ { name: 'Shift 3' ,data: [16000, 0, 8000, 0, 24000, 16000, 0, 0, 8000, 0] } ,{ name: 'Shift 2' ,data: [0, 16000, 0, 16000, 16000, 16000, 0, 0, 0, 16000] } ,{ name: 'Shift 1' ,data: [24000, 0, 16000, 0, 0, 0, 0, 24000, 0, 16000] } ] } });
back to topic: Take a look at the "series" config, inside them I have a 3 series named "Shift 1", "Shift 2", and "Shift 3" come with their own data.
From the Ext.ux.HighChart's examples, I know how to populating the chart with dynamic data used in a series. But, those data is just for static series.
And yes, my problem is: I don't know how to creating dynamic series from json.
Here is the json that will be used for the chart:
This json comes with data about "shift" and "total" which will be used in the chart's series and series' data.Code:{ "root": [ {"date": "1", "shift": "1", "total": "10000.00"}, {"date": "1", "shift": "2", "total": "24000.0000"}, {"date": "1", "shift": "3", "total": "20000.00"}, {"date": "2", "shift": "1", "total": "16000.00"}, {"date": "2", "shift": "2", "total": "0.00"}, {"date": "2", "shift": "3", "total": "16000.0000"}, {"date": "3", "shift": "1", "total": "8000.00"}, {"date": "3", "shift": "2", "total": "0.0000"}, {"date": "3", "shift": "3", "total": "24000.00"}, {"date": "4", "shift": "1", "total": "16000.00"}, {"date": "4", "shift": "2", "total": "0.0000"}, {"date": "4", "shift": "3", "total": "8000.00"} ] }
Would anyone help me to solving this problem?
Thank you before
-
11 May 2010 4:08 AM #115
I have error in IE.
The link to a thread at a highcharts support forum
http://highslide.com/forum/viewtopic...p=29525#p29403
-
15 May 2010 5:44 AM #116
Hi all,
Like Soulgen, I don't understand how to configure my Ext.ux.HighChart to use dynamic series loaded from json.
Is it possible with the current version ? Or someone can explain us how it work.
Thanx for your work Buz ;-)
-
16 May 2010 2:03 AM #117
Hi
I think animate method is no correct. this must define like below code
Code:animate: function (el, params, options){ if(options){ if(options.duration==undefined || options.duration==0){ options.duration=1; } else{ options.duration=options.duration/1000; } } if (params.width!==undefined) { Ext.get(el).setWidth(parseInt(params.width), {duration:options.duration}); } else if (params.height!==undefined) { Ext.get(el).setHeight(parseInt(params.height), {duration:options.duration}); } else if (params.left!==undefined) { Ext.get(el).setLeft(parseInt(params.left)); } else if (params.opacity!==undefined) { Ext.get(el).setOpacity(parseInt(params.opacity),{duration:options.duration,callback:options.complete}); } else { Ext.get(el).setTop(parseInt(params.top)); } }No honor is like knowledge
-
16 May 2010 5:31 PM #118
-
17 May 2010 1:09 AM #119
Use this as the data:
And use xField & yField in the serie configuration.Code:{ "Root":[ { "id": 1, "x": 1, "y": 12 }, { "id": 2, "x": 2, "y": 18 }, { "id": 3, "x": 3, "y": 14 }, { "id": 4, "x": 4, "y": 13 } ] }
Code:series: [{ type: 'spline', name: 'Spline', yField: 'y', xField: 'x' }]
-
17 May 2010 1:13 AM #120


Reply With Quote