简体   繁体   English

在高图中将x和y轴从左向右移动

[英]move x and y axis from left to right in highchart

I use highchart for show my income in month so i use this code: 我使用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;
        }

As you can see my local language is persian so my chart should be changed .i mean the y and x axis should be changed to the right how can i do that ? 如您所见,我的当地语言是波斯语,因此应更改我的图表。我的意思是y和x轴应更改为右侧,我该怎么做?

在此处输入图片说明 Best regards . 最好的祝福 。

Add Opposite value to 向添加正值

.SetYAxis(new YAxis
     {
         Opposite = true; 

and Reversed for xAxis 并反转为xAxis

.SetXAxis(new XAxis
     {
         Reversed = true;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM