我有一個圖表,看起來像這樣:刪除下的Highcharts酒吧類別文字圖表
我想刪除就是槓下的文字,「ödmjukhet」,「engagemang」等等。但我仍然想要在用戶將鼠標懸停在條上時在標籤上顯示分類名稱。我怎樣才能做到這一點?
這是我在C#
Highcharts chart1 = new Highcharts("Chart")
.SetXAxis(new XAxis { Categories = averageGrades.Select(averageGrade => averageGrade.CoreValue.Name).ToArray(), })
.SetYAxis(new YAxis { Min = 0, Max = 10, TickInterval = 1, Title = new YAxisTitle { Text = "Betygskalan" } })
.SetSeries(new Series { Data = data, Name = "Snittbetyg" })
.SetLegend(new Legend { Enabled = false, Layout = Layouts.Horizontal})
.SetTitle(new Title { Text = "" })
.InitChart(new Chart { DefaultSeriesType = ChartTypes.Column, Height = 300, Width = 200});
代碼這是代碼被JavaScript輸出代碼:提前
var Chart;
$(document).ready(function() {
Chart = new Highcharts.Chart({
chart: { renderTo:'Chart_container', defaultSeriesType: 'column', height: 300, width: 200 },
legend: { enabled: false, layout: 'horizontal' },
title: { text: '' },
xAxis: { categories: ['Engagemang', 'Kompetens', 'Lönsamhet', 'Ödmjukhet'] },
yAxis: { max: 10, min: 0, tickInterval: 1, title: { text: 'Betygskalan' } },
series: [{ data: [{ color: '#FF9980', y: 4 }, { color: '#A6FF80', y: 8 }, { color: '#FF9980', y: 3 }, { color: '#A6FF80', y: 9 }], name: 'Snittbetyg' }]
});
});
謝謝!
我不能怎麼一回事,因爲那麼他們不會在標籤上,當有人將鼠標懸停在酒吧 – Obsivus
答案編輯。嘗試一下 – Rab