Range selector input fields can't edit after hide() show()

Deadly 提交于 2019-12-10 20:17:38

问题


I've found some issue with selectors fields. They can't be changed after using jQuery hide() and show() methods on chart container. Is this a bug, or I've do something wrong?

Here is my example: http://jsfiddle.net/hal9000pro/jL3SX/

$(function(){
    $('#stock-mails-diagram').hide().
        highcharts('StockChart', {
            rangeSelector : {
                inputDateFormat:"%Y-%m-%d",
                inputEditDateFormat:"%Y-%m-%d"
            },

            title : {
                text : 'Emails sent per day'
            },
            series : [
            {
                name : 'mails sent',
                type: 'area',
                step: 'true',
                data : mails
            }],
            plotOptions:{
                area:{
                    dataLabels:{
                        enabled:false
                    }
                }
            }
        });
    $('#stock-mails-diagram').show();
});

回答1:


Generally highcharts should be created in hidden div, so you can use workaround like here http://www.highcharts.com/docs/frequently-asked-questions



来源:https://stackoverflow.com/questions/20964746/range-selector-input-fields-cant-edit-after-hide-show

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