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

Duplicate vertical axis values for 100% stacked bars chart

5 Answers 70 Views
Charts
This is a migrated thread and some comments may be shown as answers.
alizator
Top achievements
Rank 1
alizator asked on 28 Sep 2015, 09:32 AM

Hello,

I have an issue with the 100% stacked bars chart. The vertical axis display duplicate values: 100%, 99%, 98% , 97%

Please see this dojo link to reproduce the issue.

 Can you please help me with this issue?

Thanks,
Alex

5 Answers, 1 is accepted

Sort by
0
Accepted
EZ
Top achievements
Rank 2
answered on 28 Sep 2015, 04:19 PM

For a stacked 100% bar, you need to set the min to 0 (you could also set the max value).

                valueAxis: {
                    min: 0,
                    line: {
                        visible: false
                    },
                    minorGridLines: {
                        visible: true
                    },
                },

 

Updated DOJO

 

The repeated values was because the decimals were hidden.

0
Iliana Nikolova
Telerik team
answered on 30 Sep 2015, 07:19 AM
Hi guys,

Another option is to set valueAxis.majorUnit. For your convenience here is an updated dojo.

Regards,
Iliana Nikolova
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
alizator
Top achievements
Rank 1
answered on 30 Sep 2015, 10:05 AM

Hello,

Thanks it work I putted also the max value( max:1). I didn't get the part with the decimals were hidden?

Alex

0
alizator
Top achievements
Rank 1
answered on 30 Sep 2015, 11:28 AM

Hello,

 It looks ok but if you click the "No" legend the value axis looks ugly.

Thanks,
Alex

0
EZ
Top achievements
Rank 2
answered on 30 Sep 2015, 12:54 PM

You can use the legenditemclick event to prevent the series from being hidden:

http://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/chart#events-legendItemClick

 

 ‚Äč

Tags
Charts
Asked by
alizator
Top achievements
Rank 1
Answers by
EZ
Top achievements
Rank 2
Iliana Nikolova
Telerik team
alizator
Top achievements
Rank 1
Share this question
or