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

[Solved] Please help to create a chart

1 Answer 75 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
vin
Top achievements
Rank 1
vin asked on 20 Apr 2009, 08:20 AM



Please help me to create a chart like this...

I have total 10 pens and i took 5 out of that ten...then i need to show this data in a single bar ..where bar total length should be 10 and should mark upto five..horizondally...

1 Answer, 1 is accepted

Sort by
0
Dessy
Telerik team
answered on 22 Apr 2009, 06:45 AM
Hi vin,

In order to  create horizontal-oriented Bar Chart  you should set  SeriesOrientation property of RadChart  to 'Horizontal' .   Setting BarWidthPercent to 100 will enlarge the size of Bar Series and in this way you will achieve one Bar Series containing two parts - first part will be the  value of the item and the next one -PlotArea- will represent what's left of the YAxis. You could also customize the appearance of Plot Area (your second series part) and Series Item using Appearance properties. Here is an example:

        <telerik:RadChart ID="RadChart1" runat="server" SeriesOrientation="Horizontal" Height="140"   
            AutoLayout="true">   
            <Series>   
                <telerik:ChartSeries Name="Series 1" > 
                    <Appearance BarWidthPercent="100">   
                    </Appearance>   
                    <Items>   
                        <telerik:ChartSeriesItem Name="Item 1" YValue="5">   
                        </telerik:ChartSeriesItem>   
                    </Items>   
                </telerik:ChartSeries>   
            </Series>   
            <PlotArea>   
                <YAxis AutoScale="False" MaxValue="10" MinValue="0" Step="1">   
                    <AxisLabel>   
                        <Appearance RotationAngle="0">   
                        </Appearance>   
                    </AxisLabel>   
                </YAxis>   
            </PlotArea>   
        </telerik:RadChart>   
 

Alternatively, you can use a StackedBar series. Note, that the values are summed, so in this case you should have two series with one item each. And each item's YValue property should be set to 5.

Greetings,
Dessy
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.
Tags
Chart (Obsolete)
Asked by
vin
Top achievements
Rank 1
Answers by
Dessy
Telerik team
Share this question
or