我有一个看起来像这样的图表:
我想删除栏下的文本,“ö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' }]
});
});
提前致谢!