This is a migrated thread and some comments may be shown as answers.

Step size on value axis

6 Answers 763 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Roel Hans Bethlehem
Top achievements
Rank 1
Roel Hans Bethlehem asked on 17 Jan 2012, 02:52 PM
I was looking for a property to set the stepsize on the value axis. By this I mean instead of (0, 10, 20, 30 ... 90, 100) to specify 0, 25, 50, 75, 100 on the value axis.

Is this possible and if so what property should I use?

Thanks

Roel Hans

6 Answers, 1 is accepted

Sort by
0
Dmitriy
Top achievements
Rank 1
answered on 19 Jan 2012, 02:06 PM
I had the same problem, try using
xAxis:{
    majorUnit: 1 //step size
}
0
Roel Hans Bethlehem
Top achievements
Rank 1
answered on 25 Jan 2012, 09:02 AM
Hi Dimitry,

Thanks for the info. That was what I was looking for. I must have overlooked it in the documentation as it is rightly stated there.

Thank you and kind regards

Roel Hans
0
Shahed
Top achievements
Rank 1
answered on 06 Dec 2020, 09:56 AM
Hello I have got the same problem my Code Is like bellow

 $("#chartGradeInflations").kendoChart({

            dataSource: source,
            title: {
                text: "Grade Inflation"
            },
            legend: {
                visible: false,
                position: "top",
            },
            theme: "moonlight",

            seriesDefaults: {
                type: "column",
                stack: true
            },
            categoryAxis: {
                majorGridLines: {
                    visible: false
                }, labels: {
                    rotation: -75
                }
            },
           
            tooltip: {
                visible: true,
                format: "{0}",
                template: "Total Cost: #= dataItem.Value #<br>Active Employee: #= dataItem.HeadCount #",

            },
            series: [{
                field: "Value",
                categoryField: "Category",
            },
            
            ],
            valueAxis: {
              
                minorGridLines: {
                    visible: false,
                    majorUnit: 100000
                },
                
            },
           

        });

would you please tell me how can I decrease the interval of my valueAxis so that my chart bar will appear those are small valued in respect of other categories . My chart look is attached .


0
Alex Hajigeorgieva
Telerik team
answered on 09 Dec 2020, 12:45 PM

Hi, Shahed,

Thank you very much for the chart configuration.

The reason why the majorUnit is not applied in your case is because it is misplaced. It should be nested in the valueAxis, not inside the majorGridLines.

https://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/chart/configuration/valueaxis.majorunit

If you place it one level up, it should solve the issue:

https://dojo.telerik.com/ONuqateJ


Kind regards,

Alex Hajigeorgieva

the Telerik team

Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Shahed
Top achievements
Rank 1
answered on 09 Dec 2020, 05:17 PM
Thanks a lot for your nice reply Alex . One other thing should be mentioned that my data source  has a group field called  "Name" . Here my objective is to generate a stack of two series . In that case what should I do ? By applying the way you suggested I got a view like the attachment . And my data source code was like below -

 var dataSource = new kendo.data.DataSource({
            transport: {

                read: {
                    url: '../PayrollDashboard/MonthlyGradeInflation/',


                    type: "POST",
                    async: true,
                    data: function () {
                        return source;
                    },
                    dataType: "json",

                    contentType: "application/json; charset=utf-8"
                },
                parameterMap: function (options) {
                    return JSON.stringify(options);
                }
            },
            group: {
              
                field: "Name",
            }
        });
0
Alex Hajigeorgieva
Telerik team
answered on 14 Dec 2020, 12:12 PM

Hello, Shahed,

This forum post discusses the step of the value axis and it is best to address non related questions such as grouping and stacking in other threads or in a private support tickets so that the forum thread can remain focused on that single topic for others who may visit it in the future.

Nonetheless, if you remove the series.categoryField from the configuration, the stack will take place. Here is an updated Dojo for your reference:

https://dojo.telerik.com/@bubblemaster/oraVOheG

Kind Regards,
Alex Hajigeorgieva
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Charts
Asked by
Roel Hans Bethlehem
Top achievements
Rank 1
Answers by
Dmitriy
Top achievements
Rank 1
Roel Hans Bethlehem
Top achievements
Rank 1
Shahed
Top achievements
Rank 1
Alex Hajigeorgieva
Telerik team
Share this question
or