Open Highcharts in modal window

后端 未结 3 639
清酒与你
清酒与你 2021-01-03 07:30

I\'m working on a site where I use Highcharts quite heavily for presenting data in charts. I want to user to be able to \"zoom\" each chart into a modal window for better re

3条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-03 07:52

    You can get the new range by the selection event and then get the respective position from the chart serie. See my example. http://jsfiddle.net/ricardolohmann/sZMFh/ So, if you want to show it inside the lightbox you have to change the following code:

    chart2 = new Highcharts.StockChart({
        chart: {
            renderTo: 'container2'
        },
        series: newSeries
    });
    

    To this one, and set the container2 display to none

    Lightview.show({ url: 'container2', type: 'inline' });
    

提交回复
热议问题