Hi i am using 2015.1.401.40 version.
and i am trying to show product summary chart but the height 100% is not working(please see attached screen shot).
And how do i set Totals/Counts always show on the bottom(if user scrolls then only products section move)
here is my code
4 Answers, 1 is accepted
Is there a chance that the used by you HtmlChart is wrapped into initially not visible parent (e.g. a PageView)? I am asking you that as in such scenarios you will need to redraw() / repaint() the chart manually once it gets visible in order for it to calculate its size properly.
There is also an already fixed issue on the matter, which is fixed after the used by you version has been released, so you can try the workarounds suggested there: RadHtmlChart is not rendered when initially hidden wrapper becomes visible
If this does not help, please, send us a sample runnable page where both of the reported issue scan be reproduced, so can examine them locally and advice you further.
And how do i set different colors for each bar?
The HtmlChart in the provided project is not sized to 100% of the page, as its parent size is not configured thus the default size of the control is set. In order to make the control occupy 100% of a container's size you have to make sure that all of its parent's size is also configure in percents (up to a parent with a fixed size). This is valid for every HTML page with size set in percents and is not anything specific to RadHtmlChart but is rather a general programming issue.
As for that how to set different color for each bar in the chart, you can use the ColorField property of a BarSeries, defining the desired colors in the passed:
For convenience I am attaching the modified version of your code so you can examine it on your side.
Count the rows that you are binding to the selected chart and multiply them by 20 :)
int rcHeight = data.Count() * 20;
radChart.Height = rcHeight;
there you have dynamic height of the selected chart.