1. #111
    Ext JS Premium Member
    Join Date
    Dec 2007
    Location
    Berne / Switzerland
    Posts
    96
    Vote Rating
    0
    buergi is on a distinguished road

      0  

    Default


    great stuff, Daniël. works perfect!

  2. #112
    Ext User
    Join Date
    Sep 2009
    Posts
    4
    Vote Rating
    0
    DirkWei is on a distinguished road

      0  

    Default


    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!

  3. #113
    Ext JS Premium Member
    Join Date
    Dec 2007
    Location
    Berne / Switzerland
    Posts
    96
    Vote Rating
    0
    buergi is on a distinguished road

      0  

    Default


    @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]}]
            });

  4. #114
    Sencha User
    Join Date
    Jun 2008
    Posts
    43
    Vote Rating
    0
    soulgen is on a distinguished road

      0  

    Default


    How do I configure Ext.ux.HighChart which has a dynamic series loaded from json?

    Here is my chart configuration using a static data:

    Code:
    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]
    			}
    		]
        }
    });
    you can look how this chart looks like in the attachment

    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:

    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"}
    	]
    }
    This json comes with data about "shift" and "total" which will be used in the chart's series and series' data.

    Would anyone help me to solving this problem?

    Thank you before
    Attached Images

  5. #115
    Ext User
    Join Date
    Dec 2008
    Posts
    20
    Vote Rating
    0
    tolichsvs is on a distinguished road

      0  

    Default


    I have error in IE.
    The link to a thread at a highcharts support forum
    http://highslide.com/forum/viewtopic...p=29525#p29403


  6. #116
    Ext User
    Join Date
    Apr 2010
    Posts
    1
    Vote Rating
    0
    Mayus is on a distinguished road

      0  

    Default


    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 ;-)

  7. #117
    Sencha User
    Join Date
    Oct 2007
    Location
    Iran
    Posts
    165
    Vote Rating
    0
    vahid4134 is on a distinguished road

      0  

    Default


    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

  8. #118
    Ext User
    Join Date
    May 2010
    Posts
    1
    Vote Rating
    0
    4fan is on a distinguished road

      0  

    Default


    Thank you.
    I like it

  9. #119
    Sencha User
    Join Date
    Sep 2008
    Location
    Netherlands
    Posts
    106
    Vote Rating
    1
    buz is on a distinguished road

      0  

    Default


    Quote Originally Posted by buergi View Post
    @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]}]
            });
    Use this as the data:
    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 }
        ]
    }
    And use xField & yField in the serie configuration.

    Code:
    series: [{
        type: 'spline',
        name: 'Spline',
        yField: 'y', 
        xField: 'x' 
    }]

  10. #120
    Sencha User
    Join Date
    Sep 2008
    Location
    Netherlands
    Posts
    106
    Vote Rating
    1
    buz is on a distinguished road

      0  

    Default


    Quote Originally Posted by vahid4134 View Post
    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));
            }
        }
    Thanks! I'll update the code.

Thread Participants: 125

  1. mystix (1 Post)
  2. medusadelft (5 Posts)
  3. marcing (2 Posts)
  4. sj137 (3 Posts)
  5. lossendae (1 Post)
  6. brookd (4 Posts)
  7. ccquiles (1 Post)
  8. jmass (1 Post)
  9. robin30 (2 Posts)
  10. Hemlock (1 Post)
  11. vahid4134 (1 Post)
  12. Sesshomurai (1 Post)
  13. pawelb1973 (1 Post)
  14. tonedeaf (2 Posts)
  15. mm_202 (1 Post)
  16. PTG (2 Posts)
  17. buergi (18 Posts)
  18. dorgan (18 Posts)
  19. mitchellsimoens (5 Posts)
  20. BlueCamel (1 Post)
  21. ganchsg (1 Post)
  22. Shaguar (5 Posts)
  23. enpasos (2 Posts)
  24. Eitschman (1 Post)
  25. Remy (1 Post)
  26. Urkman (4 Posts)
  27. bdunkin (1 Post)
  28. gthe (4 Posts)
  29. ttbgwt (1 Post)
  30. nathand (1 Post)
  31. Scorpie (1 Post)
  32. soulgen (6 Posts)
  33. leonardb (13 Posts)
  34. christophe67 (4 Posts)
  35. wki01 (1 Post)
  36. wemerson.januario (1 Post)
  37. nego2 (1 Post)
  38. tolichsvs (1 Post)
  39. xstegner (2 Posts)
  40. Alex84 (2 Posts)
  41. nxminh (1 Post)
  42. edykstra (3 Posts)
  43. neuralys (1 Post)
  44. r_honey (13 Posts)
  45. tvik (1 Post)
  46. xiongzhijian51 (1 Post)
  47. plaak (1 Post)
  48. meroy (1 Post)
  49. tryingextjs (2 Posts)
  50. talha06 (4 Posts)
  51. stephen.friedrich (1 Post)
  52. lpastor (1 Post)
  53. Manoharan (9 Posts)
  54. f.wolfsjaeger (2 Posts)
  55. shinkenno (2 Posts)
  56. asagala (2 Posts)
  57. DirkWei (1 Post)
  58. ralphmyers420 (12 Posts)
  59. ChiefDanGeorge (7 Posts)
  60. dvuja2 (1 Post)
  61. tripEXITo (1 Post)
  62. dr1811 (4 Posts)
  63. ljankowski (1 Post)
  64. robindel (1 Post)
  65. lj2008 (1 Post)
  66. ipebaikbanget (1 Post)
  67. cq.yangyu@gmail.com (1 Post)
  68. suntaek (1 Post)
  69. kurt schrauwen (1 Post)
  70. lalllall (1 Post)
  71. bdom (2 Posts)
  72. jackygurui (4 Posts)
  73. MeeMMeeM (6 Posts)
  74. denise (5 Posts)
  75. prabhu_patil (1 Post)
  76. araiczyk (1 Post)
  77. ferns (1 Post)
  78. yvestan (2 Posts)
  79. BigSeanDawg (1 Post)
  80. fabads (19 Posts)
  81. babaqga123 (1 Post)
  82. Mayus (1 Post)
  83. Christiand (3 Posts)
  84. greenst (2 Posts)
  85. SpinoWeb (4 Posts)
  86. vanessa_ng (2 Posts)
  87. toma (1 Post)
  88. 4fan (1 Post)
  89. donp (1 Post)
  90. karthik085 (7 Posts)
  91. aminaq (1 Post)
  92. fabiojpoli (8 Posts)
  93. sosy (1 Post)
  94. ericsmith66 (2 Posts)
  95. rebeccapeltz (4 Posts)
  96. kyrillos52 (2 Posts)
  97. guessit (7 Posts)
  98. israel.galan (5 Posts)
  99. Joe Kuan (12 Posts)
  100. Erci (5 Posts)
  101. liechtir (1 Post)
  102. wump (2 Posts)
  103. jprakash (1 Post)
  104. smkkiran (1 Post)
  105. framazz (4 Posts)
  106. pauldugas (1 Post)
  107. ToddJB (2 Posts)
  108. kaendsle (2 Posts)
  109. epimerde (1 Post)
  110. muralikr (1 Post)
  111. logon68 (1 Post)
  112. x0ner (1 Post)
  113. agus.delonge (1 Post)
  114. wuming444 (3 Posts)
  115. willigogs (4 Posts)
  116. Nicodemuz (1 Post)
  117. cmhampton (3 Posts)
  118. es3analytics (5 Posts)
  119. dgotty (2 Posts)
  120. spradeepv (1 Post)
  121. AshNathan (2 Posts)
  122. hassane (1 Post)
  123. Mr.Solomon (1 Post)
  124. senRsl (2 Posts)
  125. lbrutti (1 Post)