Pyk*_*kih 3 highcharts lazy-high-charts
有谁知道如何减少这个饼图的大小?我正在使用Lazy High Charts gem.
return LazyHighCharts::HighChart.new('pie') do |f|
f.chart({:defaultSeriesType=>"pie" , :margin=> [0, 0, 0, 0], backgroundColor: "#F5F5F5", renderTo: "mediamix#{akid.to_s}"} )
f.series({:type=> 'pie', :name=> "Count",:data=> data_val, borderWidth: 0})
f.title({ :text=> nil})
f.plot_options({:pie=>{:allowPointSelect=>true, :cursor=>"pointer" , dataLabels: {enabled: true}, showInLegend: false}})
end
Run Code Online (Sandbox Code Playgroud)

您还可以通过Highchart API快速定义宽度和高度:
$('#container').highcharts({
chart: {
height: 200,
width:100
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7775 次 |
| 最近记录: |