dongyi1215 2014-04-24 07:24
浏览 21
已采纳

系列和类别数据不会动态变化

I have these two fiddles - first and second.

in the first one I have written -

var chart = $('#container').highcharts();
chart.xAxis[0].setCategories(['J', 'F', 'M', 'A', 'N']);

this code within first if block and in the second i have written this in a different if block.

My doubt is that why only in the second one the categories are changed on selecting DATA SET B

please guide.

  • 写回答

2条回答 默认 最新

  • dtwk6019 2014-04-24 09:13
    关注

    Add this -

    $("#list").on('change', function(){
          var selVal = $("#list").val();
        if(selVal == "B")
        {
        var chart = $('#container').highcharts();
        chart.xAxis[0].setCategories(['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D']);
        }
    });
    

    here is the fiddle - fiddle

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试
  • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题
  • ¥15 教务系统账号被盗号如何追溯设备
  • ¥20 delta降尺度方法,未来数据怎么降尺度
  • ¥15 c# 使用NPOI快速将datatable数据导入excel中指定sheet,要求快速高效
  • ¥15 再不同版本的系统上,TCP传输速度不一致
  • ¥15 高德地图点聚合中Marker的位置无法实时更新
  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题