File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed
Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change 5353 scope [ attrs . fcChartObject ] = chart ;
5454 chart . render ( ) ;
5555 } else if ( attrs . fcJsonUrl ) {
56- $http . get ( attrs . fcJsonUrl )
57- . success ( function ( data ) {
58- data . renderAt = element [ 0 ] ;
59- chart = new FusionCharts ( data ) ;
60- scope [ attrs . fcChartObject ] = chart ;
61- chart . render ( ) ;
62- } )
63- . error ( function ( err ) {
64- throw err ;
65- } ) ;
56+ var chartConfigObject = {
57+ type : attrs . fcType ,
58+ width : attrs . fcWidth ,
59+ height : attrs . fcHeight ,
60+ renderAt : element [ 0 ] ,
61+ dataFormat : 'json' ,
62+ events : events
63+ } ;
64+ chart = new FusionCharts ( chartConfigObject ) ;
65+ chart . setJSONUrl ( attrs . fcJsonUrl ) ;
66+ scope [ attrs . fcChartObject ] = chart ;
67+ chart . render ( ) ;
6668 } else {
6769 var chartConfigObject = {
6870 type : attrs . fcType ,
You can’t perform that action at this time.
0 commit comments