This is a migrated thread and some comments may be shown as answers.

Drill Down Functionality

2 Answers 499 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Jud
Top achievements
Rank 1
Jud asked on 27 Dec 2011, 10:42 AM
Hi Telerik team,

Do Kendu UI charts provide drill down functionality? Like, say, I want the user to redirect to another page as a result of clicking on area of a chart to show more details? If yes, then how?

Thanks in advance.

2 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 27 Dec 2011, 06:06 PM
Hi,

 Drill-down functionality is not supported out of the box yet. However the chart exposes a seriesClick event which can be used instead. You can find a live demo here.

All the best,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Sam
Top achievements
Rank 1
answered on 07 Mar 2012, 11:10 AM
Hi Atanas ,

I've copied and pasted the onSeriesClick function that is displayed on the demo and for some reason it doesn't work, (code pasted below) any ideas?

<script type="text/javascript">
            function createChart() {
                $("#chart").kendoChart({
                    theme: $(document).data("kendoSkin") || "default",
                    title: {
                        text: "Project Management"
                    },
                    legend: {
                        position: "bottom"
                    },
                    seriesDefaults: {
                        labels: {
                            template: "#= kendo.format('{0:P}', percentage)#",
                            visible: true
                        }
                    },
                    series: [{
                        type: "pie",
                        data: [{
                            category: "Quality",
                            value: 80
                        }, {
                            category: "Time",
                            value: 80
                        }, {
                            category: "Cost",
                            value: 80
                        }]
                    }],
                    tooltip: {
                        visible: true,
                        template: "#= kendo.format('{0:P}', percentage)#"
                    }
                });
            }

            function onSeriesClick(e) {
                alert("Clicked value: " + e.value);
            }


            $(document).ready(function () {
                setTimeout(function () {
                    // Initialize the chart with a delay to make sure
                    // the initial animation is visible
                    createChart();


                    $("#example").bind("kendo:skinChange", function (e) {
                        createChart();
                    });
                }, 400);


                $(".configuration").bind("change", refresh);
            });


            function refresh() {
                var chart = $("#chart").data("kendoChart"),
                        pieSeries = chart.options.series[0],
                        labels = $("#labels").prop("checked"),
                        alignInputs = $("input[name='alignType']"),
                        alignLabels = alignInputs.filter(":checked").val();

                chart.options.transitions = false;
                pieSeries.labels.visible = labels;
                pieSeries.labels.align = alignLabels;


                alignInputs.attr("disabled", !labels);


                chart.refresh();
            }
            
        </script>


Tags
Charts
Asked by
Jud
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Sam
Top achievements
Rank 1
Share this question
or