简体   繁体   中英

Reverse Y axis in Kendo-UI

I am trying to make the direction of the values for the Y axis to go from 1 to 8000, 8000 at the top and 1 at the bottom.

 function createChart() {
                    $("#chart").kendoChart({
                        title: {
                            text: "Units sold"
                        },
                        dataSource: {
                            data: stats
                        },
                        categoryAxis: {                            
                            labels: {                                
                                step: 10,
                                format: "n2"
                            },
                        },
                        series: [{
                            type: "line",
                            field: "y",
                            categoryField: "x",
                            style: "smooth",
                            markers: {
                             visible: false
                          }
                        }],

                    });
                }

                $(document).ready(createChart);

Here is jfiddle: http://jsfiddle.net/nDS3S/31/

It is possible and here is the solution: http://jsfiddle.net/nDS3S/32/

All you need is to add the following line of code:

valueAxis: {
   reverse: true,
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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