在 highchart 中从左到右移动 x 和 y 轴
move x and y axis from left to right in highchart
我使用 highchart 来显示我一个月的收入,所以我使用这个代码:
public Highcharts ActivityMonthlyChart(string username,string year)
{
//some code to get data
Highcharts charts = new Highcharts("ActivityChart")
.SetTitle(new Title
{
Text = ""
})
.SetXAxis(new XAxis
{
Categories =
new[]
{
"فروردین", "اردیبهشت", "خرداد", "تیر", "مرداد", "شهریور", "مهر", "آبان", "آذر", "دی"
,
"بهمن", "اسفند"
}
})
.SetTooltip(new Tooltip
{
Formatter = @"function() {
return '<center><b>'+ this.series.name +'</b><br/>'+
this.x +': '+ this.y +'تومان<center>';
}",
Crosshairs = new Crosshairs(true),
})
.SetYAxis(new YAxis
{
Title = new YAxisTitle {Text = "قیمت - تومان"},
PlotLines = new[]
{
new YAxisPlotLines
{
Value = 0,
Width = 10000,
}
},
}
)
.SetSeries(new Series
{
Data = new Data(myObject)
});
return charts;
}
如您所见,我的本地语言是波斯语,所以我的图表应该更改。我的意思是 y 轴和 x 轴应该向右更改我该怎么做?
最好的问候。
将相反的值添加到
.SetYAxis(new YAxis
{
Opposite = true;
xAxis 反转
.SetXAxis(new XAxis
{
Reversed = true;
我使用 highchart 来显示我一个月的收入,所以我使用这个代码:
public Highcharts ActivityMonthlyChart(string username,string year)
{
//some code to get data
Highcharts charts = new Highcharts("ActivityChart")
.SetTitle(new Title
{
Text = ""
})
.SetXAxis(new XAxis
{
Categories =
new[]
{
"فروردین", "اردیبهشت", "خرداد", "تیر", "مرداد", "شهریور", "مهر", "آبان", "آذر", "دی"
,
"بهمن", "اسفند"
}
})
.SetTooltip(new Tooltip
{
Formatter = @"function() {
return '<center><b>'+ this.series.name +'</b><br/>'+
this.x +': '+ this.y +'تومان<center>';
}",
Crosshairs = new Crosshairs(true),
})
.SetYAxis(new YAxis
{
Title = new YAxisTitle {Text = "قیمت - تومان"},
PlotLines = new[]
{
new YAxisPlotLines
{
Value = 0,
Width = 10000,
}
},
}
)
.SetSeries(new Series
{
Data = new Data(myObject)
});
return charts;
}
如您所见,我的本地语言是波斯语,所以我的图表应该更改。我的意思是 y 轴和 x 轴应该向右更改我该怎么做?
将相反的值添加到
.SetYAxis(new YAxis
{
Opposite = true;
xAxis 反转
.SetXAxis(new XAxis
{
Reversed = true;