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

Hide everything except the bar, how?

4 Answers 98 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
alsi
Top achievements
Rank 1
alsi asked on 29 Oct 2008, 01:26 AM
Dear All!

I have the following question with the type of StackedBar100
I want the bar without any labels, backgrounds, etc.

Now I have the following chart:
http://www.anda.hu/have.jpg

And I want the following:
http://www.anda.hu/want.jpg

Is it possible? how?

many thx,
alsi

4 Answers, 1 is accepted

Sort by
0
Accepted
Ves
Telerik team
answered on 29 Oct 2008, 08:24 AM
Hello alsi,

You will need to set all the margins to 0, hide the axes, hide the plot area and background borders, set BarWidthPercent to 100, hide the chart title and the legend. You might also want to hide the ChartSeriesItems borders and labels. Here is an example:

<telerik:RadChart ID="RadChart1" runat="server" Height="99px" SeriesOrientation="Horizontal" Width="381px"
            <Series> 
                <telerik:ChartSeries Name="Series 1" Type="StackedBar100"
                    <Items> 
                        <telerik:ChartSeriesItem Name="Item 1" YValue="3"
                        </telerik:ChartSeriesItem> 
                    </Items> 
                    <Appearance BarWidthPercent="100"
                        <LabelAppearance Visible="False"
                        </LabelAppearance> 
                        <Border Visible="False" /> 
                    </Appearance> 
                </telerik:ChartSeries> 
                <telerik:ChartSeries Name="Series 2" Type="StackedBar100"
                    <Items> 
                        <telerik:ChartSeriesItem Name="Item 1" YValue="4"
                        </telerik:ChartSeriesItem> 
                    </Items> 
                    <Appearance BarWidthPercent="100"
                        <LabelAppearance Visible="False"
                        </LabelAppearance> 
                        <Border Visible="False" /> 
                    </Appearance> 
                </telerik:ChartSeries> 
                <telerik:ChartSeries Name="Series 3" Type="StackedBar100"
                    <Items> 
                        <telerik:ChartSeriesItem Name="Item 1" YValue="3"
                        </telerik:ChartSeriesItem> 
                    </Items> 
                    <Appearance BarWidthPercent="100"
                        <LabelAppearance Visible="False"
                        </LabelAppearance> 
                        <Border Visible="False" /> 
                    </Appearance> 
                </telerik:ChartSeries> 
                <telerik:ChartSeries Name="Series 4" Type="StackedBar100"
                    <Items> 
                        <telerik:ChartSeriesItem Name="Item 1" YValue="7"
                        </telerik:ChartSeriesItem> 
                    </Items> 
                    <Appearance BarWidthPercent="100"
                        <LabelAppearance Visible="False"
                        </LabelAppearance> 
                        <Border Visible="False" /> 
                    </Appearance> 
                </telerik:ChartSeries> 
            </Series> 
            <PlotArea> 
                <XAxis Visible="False"
                </XAxis> 
                <YAxis Visible="False"
                </YAxis> 
                <Appearance Dimensions-Margins="0px, 0px, 0px, 0px"
                    <Border Visible="False" /> 
                </Appearance> 
            </PlotArea> 
            <Appearance BarWidthPercent="100"
                <Border Visible="False" /> 
            </Appearance> 
            <ChartTitle Visible="False"
            </ChartTitle> 
            <Legend Visible="False"
            </Legend> 
        </telerik:RadChart> 


Best regards,
Ves
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
alsi
Top achievements
Rank 1
answered on 29 Oct 2008, 10:03 AM
Thanks! Telerik has the best component family and all over the world best support team and forum!
0
David
Top achievements
Rank 1
answered on 01 Nov 2008, 12:47 AM
Is it also possible to get a pie chart to take up the entire plot area. I'm unable to change the PlotArea.Appearance.Dimensions Margins to 0px or the autosize to false.
0
Ves
Telerik team
answered on 03 Nov 2008, 07:28 AM
Hi,

Can you please elaborate on the issue you have with setting the margins to zero? Here is an updated version of the above example -- now it shows a pie chart, filling the entire plot area:

<telerik:RadChart ID="RadChart1" runat="server" Height="200px" SeriesOrientation="Horizontal" 
            Width="200px"
            <Series> 
                <telerik:ChartSeries Name="Series 1" Type="Pie"
                    <Items> 
                        <telerik:ChartSeriesItem Name="Item 1" YValue="3"
                        </telerik:ChartSeriesItem> 
                        <telerik:ChartSeriesItem Name="Item 2" YValue="2"
                        </telerik:ChartSeriesItem> 
                        <telerik:ChartSeriesItem Name="Item 3" YValue="4"
                        </telerik:ChartSeriesItem> 
                    </Items> 
                    <Appearance DiameterScale="1"
                        <LabelAppearance Visible="False"
                        </LabelAppearance> 
                    </Appearance> 
                </telerik:ChartSeries> 
            </Series> 
            <PlotArea> 
                <Appearance Dimensions-Margins="0px, 0px, 0px, 0px"
                    <Border Visible="False" /> 
                </Appearance> 
            </PlotArea> 
            <Appearance> 
                <Border Visible="False" /> 
            </Appearance> 
            <ChartTitle Visible="False"
            </ChartTitle> 
            <Legend Visible="False"></Legend> 
        </telerik:RadChart> 


Best regards,
Ves
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Chart (Obsolete)
Asked by
alsi
Top achievements
Rank 1
Answers by
Ves
Telerik team
alsi
Top achievements
Rank 1
David
Top achievements
Rank 1
Share this question
or