Rerender funnel highcharts with new data

試著忘記壹切 提交于 2019-12-31 03:57:06

问题


I am using highcharts in my MVC3 application and I am trying to refresh once the data is modified but the chart doesnot refresh.

I am drawing the chart as follows:-

function initializeChart() {

        chart1 = new Highcharts.Chart({
            chart: {
                renderTo: 'container',
                type: 'funnel'
            },
            title: {
                text: 'Deal Funnel Stats',
                x: -50
            },
            legend: {
                enabled: false
            },
            exporting: {
                buttons: { 
                    exportButton: {
                        enabled:false
                    },
                    printButton: {
                        enabled:false
                    }

                }
            },
            plotOptions: {
                series: {
                    dataLabels: {
                        enabled: true,
                        format: '<b>{point.name}</b> ({point.y:,.0f})',
                        color: 'black',
                        softConnector: true
                    },
                    neckWidth: '0%',
                    neckHeight: '0%'

                    //-- Other available options
                    // height: pixels or percent
                    // width: pixels or percent
                }
            },
            series: [{
                data: @Html.Raw(Model.seriesData)
                }]
        });
    }

Model.seriesData is coming from the the class.

Once the data is refreshed i want to reinitialize the chart with new data but it is again drawing the same chart.

Update:

The data I am having first time is:

The data I am having second time is:

Please help.

Thanks.

来源:https://stackoverflow.com/questions/20386586/rerender-funnel-highcharts-with-new-data

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!