i want to assign radchart Bar width in pixel. i am binding chart with dataset.
so that if there is only 1 item(1bar) in the graph then width should not expand to whole width of the chart.
Barwidthpercentage sets bar width with respect to items. but if there is less items then barwidth increases.
thanks
so that if there is only 1 item(1bar) in the graph then width should not expand to whole width of the chart.
Barwidthpercentage sets bar width with respect to items. but if there is less items then barwidth increases.
thanks
5 Answers, 1 is accepted
0
Hi Muhammad,
You can set XAxis.AutoScale to false and provide your own values for MinValue and MaxValue. This way, you will always have the same number of items along the X axis, so the bar will always be with the same width.
Sincerely,
Ves
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
You can set XAxis.AutoScale to false and provide your own values for MinValue and MaxValue. This way, you will always have the same number of items along the X axis, so the bar will always be with the same width.
Sincerely,
Ves
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Muhammad
Top achievements
Rank 1
answered on 13 Feb 2009, 05:14 AM
thanks. i tried your solution but.
i did XAxis.AutoScale to false after binding with dataset. i set minvalue=6 & max value to 8 so it changed the axisitem label ("monday" to "6") and added another item with axisitem label "108" and the width issue remain the same. so the solution doesnot worked for me.
i repeat my issue
i like my chart to display > if dataset hv 3days data(mon,teus,wed) then i should also divide the chart bars width equivalent to when data is of 7 days( means in this case 3 bars jst occupy 34% of the chart not 100% of the chart)
i did XAxis.AutoScale to false after binding with dataset. i set minvalue=6 & max value to 8 so it changed the axisitem label ("monday" to "6") and added another item with axisitem label "108" and the width issue remain the same. so the solution doesnot worked for me.
i repeat my issue
i like my chart to display > if dataset hv 3days data(mon,teus,wed) then i should also divide the chart bars width equivalent to when data is of 7 days( means in this case 3 bars jst occupy 34% of the chart not 100% of the chart)
0
Hello Muhammad,
I am afraid this is not directly supported by RadChart. Still, you can achieve this - you need to calculate the value of BarWidthPercent manually. You have the necessary information -- the chart width, the plot area margins and the number of X axis items.
All the best,
Ves
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
I am afraid this is not directly supported by RadChart. Still, you can achieve this - you need to calculate the value of BarWidthPercent manually. You have the necessary information -- the chart width, the plot area margins and the number of X axis items.
All the best,
Ves
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
vin
Top achievements
Rank 1
answered on 20 Jun 2009, 12:18 PM
Hello Muhammad,
Did u get the solution for it, I am also facing same issue,,, please give answer if u could solve
Did u get the solution for it, I am also facing same issue,,, please give answer if u could solve
0
Prashant
Top achievements
Rank 1
answered on 19 Jan 2010, 06:07 AM
Hello Team,
I am using a telerik barchart which has a single value.It is occupying the entire x-axis .
Even i have tried with the solutions as suggested i souild not get it.
Please help me out how to calculate the bar width percent manually using some formula.
If possible provide me the formula.
I am using a telerik barchart which has a single value.It is occupying the entire x-axis .
Even i have tried with the solutions as suggested i souild not get it.
Please help me out how to calculate the bar width percent manually using some formula.
If possible provide me the formula.