You must Sign In to post a response.
  • Category: ASP.NET

    How to redirect the page using amChart

    Hello Sir/Madam

    I am using a am Chart for display the data . and i want to redirect the page while user click on particular area from the Pie-Chart, how can i solved this issue using am Chart.

    Thanks,
    Bhavik Shah
  • #765265
    You can use given code snippet as example for redirect the page using amChart

    for (i=0;i<=check;++i) {
    var graph = new AmCharts.AmGraph();
    graph.valueField = "count"+i+"";
    graph.balloonText = "[[value]]";
    graph.bullet = "round";
    graph.type = "smoothedLine";
    graph.lineAlpha = 1;
    graph.connect = true;
    graph.lineThickness = '2';
    chart.addGraph(graph);
    }

    var check = parametrTable.length -1;
    var loaded = 0;
    var data = [];
    $.each(parametrTable, function(i, x) {
    $.getJSON("myurlwithparametr", function(json) {
    loaded++;
    $.each(json, function(j, d) {
    data[j] = data[j] || {};
    data[j]["count" + i] = d.count;
    if (i == 0) {
    data[j].category = d.column;
    }
    });
    if(loaded == check){
    loadChart(data);
    }
    });
    });


Sign In to post your comments