Javascript 如何使高图表栏消失?

Javascript 如何使高图表栏消失?,javascript,jquery,highcharts,Javascript,Jquery,Highcharts,我正试图想出一种方法,用户可以点击一个按钮,使Highcharts栏消失 例如,在我的Highcharts代码中: $(function(){ Highcharts.setOptions({ colors:['#49acdd'], chart:{ style: { fontFamily:'Helvetica', color:'#384044' } } }); $("#chart").highcharts({ chart: {

我正试图想出一种方法,用户可以点击一个按钮,使Highcharts栏消失

例如,在我的Highcharts代码中:

$(function(){
  Highcharts.setOptions({
  colors:['#49acdd'],
  chart:{
    style: {
      fontFamily:'Helvetica',
      color:'#384044'
    }
  }
});

$("#chart").highcharts({
  chart: {
    type:'column',
    backgroundColor:'#158479'
  },
  title: {
    text: "Employer Organizations",
    style: {
      color: "#8A2BE2" //wmakes the text white
    }
  },
  xAxis: {
    tickWidth: 1,
    labels: {
      style: {
        color: '#cc3737'
      }
    },
    categories:[
      'Educational and School-Based','Government Orgs','Charitable Foundation Orgs','Health-care Orgs','Market Research Orgs','Technology Firms','Human Service Orgs','Accounting/Finance Firms'
    ]
  },
  yAxis: {
    gridLineWidth:0, //no gridlines
    title: {
      text:'',
      style:{
        color:'#fff'
      }
    },
    labels: {
      formatter:function(){
        return Highcharts.numberFormat(this.value,0,'', ' ,');//returns ex: 1000 to 1,000
      },
      style:{
        color:'#33FF00'
      }
    }
  },//end of y axis
  plotOptions:{
    column: {
      borderRadius: 4,
      pointPadding:0,//paddin between each column or bar
      groupPadding:0.1//Padding between each value groups, in x axis units
    }
  },
  series: [{
    name: "Employer Organizations",
    data: [1,2,3,4,5,6,7,8]
  }]
});
}); 

我知道“plotOptions.bar.events.click”用于触发基于单击的函数,但我找不到一个函数,该函数允许单击Highchart栏时Highchart栏消失。

在highcharts中消失特定列。修改
绘图选项

plotOptions: {
 column: {
    borderRadius: 4,
    pointPadding: 0, //paddin between each column or bar
    groupPadding: 0.1 //Padding between each value groups, in x axis units
  },
  series: {
    point: {
      events: {
        click: function() {
          if (!confirm('Do you really want to remove this column?')) {
            return false;
          } else {
            this.remove();
          }
        }
      },

    }
  }
},

演示

您能更详细地介绍一下吗?它是在网页内还是JS应用程序?如果你想删除它。。单击该条,获取该条的数据id并更新图表的数据删除选定的数据id检查这可能会有所帮助。单击要删除的列如果不想删除点,可以将其隐藏。示例:.@Danielamatini嗨daniele我很抱歉反应太晚,是的,这是一个JS应用程序。