簡體   English   中英

如何刪除Highchart圖表餅圖的相框

[英]how remove picture frame for Highchart chart pie

如何刪除圖片iframe?

在此處輸入圖片說明

 Highcharts.chart('container', { chart: { renderTo: 'container', plotBackgroundColor: null, plotBorderWidth: null, plotShadow: null }, title: { text: 'Ideas por Estado', align: 'center', style: { color: '#000000', fontWeight: 'bold' } }, credits: { enabled: false }, legend: { align: 'center', verticalAlign: 'bottom', layout: 'vertical', itemStyle: { color: '#000000', fontSize: 12 }, x: 0, y: -50 }, plotOptions: { pie: { allowPointSelect: true, cursor: 'pointer', size: '80%', center: [ '50%', '45%' ], dataLabels: { enabled: true, distance: -35, color: '#ffffff', style: { fontWeight: 'bold', fontSize: 13 }, formatter: function() { if(this.point.color=='#fd4c01'){ return '<span>' + this.y +' %</span>'; } if(this.point.color=='#77c646'){ return '<span>' + this.y +' %</span>'; } if(this.point.color=='#01a698'){ return '<span>' + this.y +' %</span>'; } } }, showInLegend: true }, }, series: [{ type: 'pie', data: [ { name: 'Company A', y: 59.2, color: '#01a698' }, { name: 'Company B', y: 30.4, color: '#77c646' }, { name: 'Company C', y: 10.4, color: '#fd4c01' } ] }] }); 
 <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script src="https://code.highcharts.com/highcharts.js"></script> <div id="container"></div> 

添加enabled : falsetooltip對象,如下所示。

tooltip : {enabled : false }

 Highcharts.chart('container', { chart: { renderTo: 'container', plotBackgroundColor: null, plotBorderWidth: null, plotShadow: null }, title: { text: 'Ideas por Estado', align: 'center', style: { color: '#000000', fontWeight: 'bold' } }, credits: { enabled: false }, legend: { align: 'center', verticalAlign: 'bottom', layout: 'vertical', itemStyle: { color: '#000000', fontSize: 12 }, x: 0, y: -50 }, plotOptions: { pie: { allowPointSelect: true, cursor: 'pointer', size: '80%', center: [ '50%', '45%' ], dataLabels: { enabled: true, distance: -35, color: '#ffffff', style: { fontWeight: 'bold', fontSize: 13 }, formatter: function() { if(this.point.color=='#fd4c01'){ return '<span>' + this.y +' %</span>'; } if(this.point.color=='#77c646'){ return '<span>' + this.y +' %</span>'; } if(this.point.color=='#01a698'){ return '<span>' + this.y +' %</span>'; } } }, showInLegend: true }, }, series: [{ type: 'pie', data: [ { name: 'Company A', y: 59.2, color: '#01a698' }, { name: 'Company B', y: 30.4, color: '#77c646' }, { name: 'Company C', y: 10.4, color: '#fd4c01' } ] }], tooltip : {enabled : false } }); 
 <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script src="https://code.highcharts.com/highcharts.js"></script> <div id="container"></div> 

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM