Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var cm_chart = $('#div_chart').highcharts({
- credits: {enabled: false},
- chart: {
- type: 'bar',
- style: {
- fontFamily: text_font
- },
- },
- title: {text: 'Example Charts', align: "center", y: 20, style: {fontSize: "16px", color: "#" + text_color}},
- xAxis: {
- categories: categories,
- labels: {
- style: {
- color: '#' + text_color
- },
- },
- useHTML: true,
- },
- yAxis: {
- min: 0,
- max: 1,
- title: {
- text: '',
- },
- labels: {
- overflow: 'justify'
- }
- },
- plotOptions: {
- column: {
- stacking: 'normal',
- dataLabels: {
- align: 'center',
- enabled: true,
- inside: true,
- crop: false,
- style: {
- textShadow: '0 0 0',
- textOutline: false
- },
- overflow: 'none'
- }
- },
- series: {
- allowPointSelect: false,
- enableMouseTracking: false,
- marker: {lineWidth: 1},
- states: {
- hover: {
- enabled: false
- }
- }
- },
- area: {color: "#00CCFF"},
- },
- tooltip: {
- enabled: true,
- },
- series: [{
- name: 'Default',
- data: [series],
- dataLabels: {
- align: 'left',
- enabled: true,
- style: {
- fontSize: 9,
- textOutline: false
- },
- }
- }, {
- name: 'Series 1',
- data: [series],
- dataLabels: {
- align: 'left',
- enabled: true,
- style: {
- fontSize: 9,
- textOutline: false
- },
- }
- }, {
- name: 'Series 2',
- data: [series],
- dataLabels: {
- align: 'left',
- style: {
- fontSize: 9,
- textOutline: false
- },
- enabled: true
- }
- }, {
- name: 'Series 3',
- data: [series],
- dataLabels: {
- align: 'left',
- enabled: true,
- style: {
- fontSize: 9,
- textOutline: false
- },
- }
- }, {
- name: 'Series 4',
- data: [series],
- dataLabels: {
- align: 'left',
- enabled: true,
- style: {
- fontSize: 9,
- textOutline: false
- },
- }
- }, {
- name: 'Series 5',
- data: [series],
- dataLabels: {
- align: 'left',
- enabled: true,
- style: {
- fontSize: 9,
- textOutline: false
- },
- }
- }]
- },function(cm_chart){
- var flag = false;
- $.each(cm_chart.series,function(i,serie){
- flag = serie.data[0].isNull;
- if(flag){
- serie.legendGroup.destroy();
- }
- });
- cm_chart.redraw();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement