We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Drill-down Chart

1) I need the series data and the drill-down data to be carried by the chart object =>to drill-down for many levels

2)  how to change the legend data to appear the series data details(points)
series: [
                  {
                      points: [
                  { x: 'Asia', y: 35.94, text: 'Asia 35.94%', fill: "#E94649" }, { x: 'America', y: 8.91, text: 'America 8.91%', fill: "#0FB954" },
                  { x: 'Europe', y: 2.88, fill: "#005277", text: 'Europe 2.88%' }, { x: 'Africa', y: 6.06, fill: "#F6B53F", text: 'Africa 6.06%' }
                      ],
                      name: "Continents",
                  },
                  {
                      points: [
                      { x: 'China', y: 16.8, text: 'China 16.8%', fill: "#E94649" },
                      { x: 'India', y: 15.6, text: 'India 15.6%', fill: "#E94649" },
                      { x: 'Indonesia', y: 3.54, text: 'Indonesia 3.54%', fill: "#E94649" },
                      { x: 'US', y: 4.42, text: 'US 2.5%', fill: "#0FB954" },
                      { x: 'Brazil', y: 2.82, text: 'Canada 2.5%', fill: "#0FB954" },
                      { x: 'Mexico', y: 1.67, text: 'Mexico 2%', fill: "#0FB954" },
                      { x: 'Germany', y: 1.11, text: 'Germany 1.11%', fill: "#005277" },
                      { x: 'France', y: 0.88, text: 'France 0.88%', fill: "#005277" },
                      { x: 'UK', y: 0.89, text: 'UK 0.89%', fill: "#005277" },
                      { x: 'Nigeria', y: 2.56, text: 'Nigeria 2.56%', fill: "#F6B53F" },
                      { x: 'Ethopia', y: 1.26, text: 'Ethopia 1.24%', fill: "#F6B53F" },
                      { x: 'Egypt', y: 2.24, text: 'Egypt 2.24%', fill: "#F6B53F" },
                      ]
                      name: "Countries",
                  }

                ]




3 Replies

DD Dharanidharan Dharmasivam Syncfusion Team August 11, 2017 12:25 PM UTC

Hi Weam,  

Thanks for contacting Syncfusion support. 

We have analyzed your query. Kindly find the response for your queries below. 

Query 
Response 
I need the series data and the drill-down data to be carried by the chart object =>to drill-down for many levels 
Your requirement can be achieved as a workaround using point region click event. Since in the pointRegionClick event we can take instance of chart and then we can store series data in chart object and after drill down in the same pointRegionClick event we can store the drill down data in the chart object as depicted below.  You can change this with respect to your requirement. 

JS: 

$("#container").ejChart( 
            { 
                //... 
                pointRegionClick: 'onclick', 
}); 
 
function onclick(sender) { 
            var chart = $("#container").ejChart("instance"); 
            //Stored the series data in chart object by taking its instance 
            chart.series1Data = data1; 
            chart.series2Data = data2; 
            //Drill down performed here 
            $("#container").ejChart("option", { "drilldown": pieSeries(pointIndex) }); 
            //Stored the drill down data 
            chart.drilledData = point; 
            document.getElementById("symbol").style.visibility = "visible"; 
 
        } 

Sample for reference can be find from below link: 



how to change the legend data to appear the series data details(points) 
Screenshot for multiple pie: 
 

Screenshot with single series pie chart: 
 

If you have single series only the data in the points will be displayed in legend as above, if you have multiple series then we have rendered the series name in legend as like in the first screen shot(multiple pie). If your requirement is to achieve as like in the second screenshot for multiple pie series, as of now we didn’t provide support for this.The reason behind this is that, if you have n number of series and n number of points in each series, then there will not be space for rendering chart, so we didn’t provide support for this. 


Kindly revert us, if you have any concern. 
 
Thanks, 
Dharani. 



WG weam ghalab August 23, 2017 05:02 PM UTC

thanks for your support and help 



DD Dharanidharan Dharmasivam Syncfusion Team August 24, 2017 04:56 AM UTC

Hi Weam, 
 
Thanks for the update. 
 
Kindly revert us, if you need any further assistance. 

Dharani. 



Loader.
Live Chat Icon For mobile
Up arrow icon