我是Highligh Charts的新手,我想创建一个这样的图表:
问题是我如何定制xAxis像图像? 请帮我做。 我使用dotnet高亮图表。
提前感谢。
修改:
这是源代码:
DotNet.Highcharts.Highcharts chart = new DotNet.Highcharts.Highcharts("chart")
.SetTitle(new Title()
{
Text = "Position of Cash/Group"
})
.SetYAxis(new YAxis()
{
Title = new YAxisTitle()
{
Text = ""
},
Labels = new YAxisLabels
{
Formatter =
"function () {if(Math.abs(this.value)>=1000) return this.value / 1000 + 'k'; else return this.value;}"
}
})
.SetXAxis(new XAxis
{
TickmarkPlacement = Placement.On,
Categories =
new[] {"1/2016", "2/2016", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"},
})
.SetSeries(new Series
{
Data =
new Data(new object[]
{29.9, 71.5, 106.4, 129.2, 1440.0, 176.0, 135.6, -1480.5, 216.4, 194.1, 95.6, 54.4}),
Color = Color.YellowGreen
}).SetLegend(new Legend()
{
Enabled = false
}).SetTooltip(new Tooltip()
{
Formatter = "function() {if(Math.abs(this.y)>=1000) return this.y / 1000 + 'k'; else return this.y; }"
}).SetCredits(new Credits()
{
Enabled = false
});