knives

disabling Thumbnails attributes not working.......................

Recommended Posts

hi i am newbie in FusionCharts.........  following samples in goes smoothly until i reach this problem......  i am following this sample http://docs.fusioncharts.com/tutorial-how-to-guides-render-thumbnail-versions-of-chart.html         My problem is the Thumbnail atttributes is not DISABLING........  the difference between my codes and the sample is the source of the data....... In my codes i am getting the json data from an external json file.........  besides that difference nothing else differs...... more info   my thumbnail resize it works....... it just the attributes are not disabling..........   it like i have small charts.........  il post my codes here hope i can get an immediate response.........  Thank You very much in advance..................

 

 

 

FusionCharts.ready(function(){
 
    var createThumbNail = function(chartId, width, height, divId) {
        var chartRef = FusionCharts(chartId),
            clonedChart = chartRef.clone({
                "width": width,
                "height": height
 
            });
 
 
           /////////////////////////////////////////////////////////////////////////////////////
          // i think this part of the codes is not working............
         /////////////////////////////////////////////////////////////////////////////////////
        clonedChart.setChartAttribute({
            "showValues": "0",
            "showLabels": "0",
            "animation": "0",
            "exportEnabled": "0",
            "showTooltip": "0",
            "showHoverEffect": "0",
            "showYAxisValues": "0",
            "caption": "",
            "subCaption": "",
            "xAxisName": "",
            "yAxisName": "",
            "showXAxisLine": "0",
            "showYAxisLine": "0",
            "numDivLines": "0",
            "enableSlicing": "0",
            "enableRotation": "0"
        });
 
          /////////////////////////////////////////////////////////////////////////////////////
          // i think this part of the codes is not working............
         /////////////////////////////////////////////////////////////////////////////////////
 
        clonedChart.addEventListener('chartClick', function() {
            FusionCharts(chartId).render('chart-container');
        });
 
        clonedChart.render(divId, 'append');
    };
 
 
var daily = new FusionCharts({
            "type": "msstackedcolumn2d",
"renderAt": "chart-container",
"width": "800",
"height": "500",
            "dataFormat": "jsonurl",
"id": "chart1",
            //"dataSource": Drupal.settings.basePath + "/chartdata2.json"
           "dataSource": Drupal.settings.basePath + Drupal.settings.fusion.link + "/js/jsondata/jsondataDaily.json"
        });
 
var weekly = new FusionCharts({
            "type": "msstackedcolumn2d",
"renderAt": "chart-container",
"width": "800",
"height": "500",
            "dataFormat": "jsonurl",
            "id": "chart2",
            //"dataSource": Drupal.settings.basePath + "/chartdata2.json"
           "dataSource": Drupal.settings.basePath + Drupal.settings.fusion.link + "/js/jsondata/jsondataQuarter.json"
        });
 
 // create thumbnails for all the three charts
createThumbNail('chart1', 300, 300, 'thumbnail1');
createThumbNail('chart2', 300, 300, 'thumbnail2');
 
weekly.render();
}); // end of code

 

Share this post


Link to post
Share on other sites

Hi,

 

Welcome to FusionCharts Forum.

 

The thumbnail attributes are enabling/disabling at our end such as "showlegend":"0" in the clonedChart.setChartAttribute() function.

 

You can check this sample link:http://jsfiddle.net/vishalika/k1qrhhfL/

 

Also, please elaborate your requirement of disabling the attributes so that we can replicate from our end and suggest you the solution.

 

Awaiting response.

Edited by Vishalika

Share this post


Link to post
Share on other sites

hi Vishalika Thank You for your immediate response......

 

  The diference in our codes is that your sample is using json data WITHIN your FusionCharts.ready(function(){});

 

My requirement is to get the json data using EXTERNAL JSON FILE as shown in 

 

"dataSource": Drupal.settings.basePath + Drupal.settings.fusion.link + "/js/jsondata/jsondataQuarter.json"

 

I think there is the problem between using an external file as a source of json data file.

 

because in my part the clonedChart.setChartAttribute() function is not working.

 

I want to disable all the attributes like in your sample so the thumbnail will look like an icon

 

can i send my file to you so that you can view my whole codes??????? 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now