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

legend colors don't match the bar chart colors

3 Answers 158 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Tanuj
Top achievements
Rank 1
Tanuj asked on 27 Feb 2008, 03:32 AM
hi,
i am working on bar chart and pie chart and am using the "Black" skin.

here is the problem
(1) the legend for the pie chart represents the coloration of the actual chart, whereas the legend of the bar chart shows a different color

(2) i would like to change the font color of the legend and the values on the chart from the default color(light gray) to white

here is the link to my web page
http://64.239.149.189:81/listing_stats.aspx

also, here is the code that am using, any help would be greatly appreciated.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="listing_stats.aspx.cs" Inherits="listing_stats" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="rad" %> 
<%@ Register TagPrefix="rad" Namespace="Telerik.Charting" Assembly="Telerik.Charting" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server">  
    <title>Listing Statistics</title> 
</head> 
<body style="margin:0px;padding:0px;background-color:Black;text-align:center;">  
    <form style="margin:0px;padding:0px;" id="form1" runat="server">  
    <div> 
<table cellpadding="0" cellspacing="0" border="0" > 
    <tr> 
        <td> 
        <rad:RadChart ID="RadChart1" runat="server" SkinsOverrideStyles="false" Skin="Black" > 
            <PlotArea> 
                <XAxis MaxValue="5" MinValue="1" Step="1">  
                </XAxis> 
                <YAxis MaxValue="100" Step="5">  
                </YAxis> 
                <YAxis2 MaxValue="100" MinValue="1" Step="1">  
                </YAxis2> 
            </PlotArea> 
            <ChartTitle> 
                <TextBlock Text="Clicks for 123 Main Street">  
                </TextBlock> 
            </ChartTitle>                                                                              
            <Series> 
                <rad:ChartSeries Name="Series 1" Type="Pie" > 
                    <Appearance LegendDisplayMode="ItemLabels">  
                        <FillStyle MainColor="Blue" SecondColor="Red">  
                        </FillStyle> 
                    </Appearance> 
                    <Items> 
                        <rad:ChartSeriesItem YValue="72" Name="C21">  
                            <Appearance> 
                                <FillStyle MainColor="Red" SecondColor="Yellow">  
                                </FillStyle>                                                                                              
                            </Appearance>                                                                                           
                        </rad:ChartSeriesItem>   
                        <rad:ChartSeriesItem YValue="30" Name="MyWeb">  
                            <Appearance> 
                                <FillStyle MainColor="Gray" SecondColor="Red">  
                                </FillStyle>                                                                                              
                            </Appearance>                                                                                           
                        </rad:ChartSeriesItem>                                             
                        <rad:ChartSeriesItem YValue="54" Name="Google">  
                            <Appearance> 
                                <FillStyle MainColor="Green" SecondColor="Yellow">  
                                </FillStyle>                                                                                              
                            </Appearance>   
                        </rad:ChartSeriesItem> 
                        <rad:ChartSeriesItem YValue="31" Name="Trulia">  
                            <Appearance> 
                                <FillStyle MainColor="Blue" SecondColor="Gray">  
                                </FillStyle>                                                                                              
                            </Appearance>   
                        </rad:ChartSeriesItem> 
                        <rad:ChartSeriesItem YValue="25" Name="Yahoo">  
                            <Appearance> 
                                <FillStyle MainColor="pink" SecondColor="magenta">  
                                </FillStyle>                                                                                              
                            </Appearance>                                                                                           
                        </rad:ChartSeriesItem> 
                    </Items> 
                </rad:ChartSeries> 
            </Series> 
        </rad:RadChart>          
        </td> 
    </tr> 
    <tr> 
        <td> 
            <rad:RadChart ID="RadChart4" runat="server" skin="Black">  
                <PlotArea> 
                    <YAxis MaxValue="300" Step="10">  
                    </YAxis> 
                    <XAxis AutoScale="False" DataLabelsColumn="Month" MaxValue="0" Step="1">  
                        <Items> 
                            <rad:ChartAxisItem> 
                                <textblock text="November"></textblock> 
                            </rad:ChartAxisItem> 
                            <rad:ChartAxisItem> 
                                <textblock text="December"></textblock> 
                            </rad:ChartAxisItem> 
                            <rad:ChartAxisItem> 
                                <textblock text="January"></textblock> 
                            </rad:ChartAxisItem> 
                            <rad:ChartAxisItem> 
                                <textblock text="February"></textblock> 
                            </rad:ChartAxisItem>                                      
                        </Items> 
                    </XAxis> 
                </PlotArea> 
                <ChartTitle> 
                    <TextBlock Text="Views vs Clicks vs Leads">  
                    </TextBlock> 
                </ChartTitle> 
                <Appearance> 
                </Appearance> 
                <Series> 
                    <rad:ChartSeries Name="Views">  
                        <Items> 
                            <rad:ChartSeriesItem YValue="125" Name="Item 20">  
                                <Appearance> 
                                    <FillStyle MainColor="Red" SecondColor="Yellow">  
                                    </FillStyle>                                                                                              
                                </Appearance>                                        
                            </rad:ChartSeriesItem> 
                            <rad:ChartSeriesItem YValue="114" Name="Item 100">  
                                <Appearance> 
                                    <FillStyle MainColor="Red" SecondColor="Yellow">  
                                    </FillStyle>                                                                                              
                                </Appearance>                                        
                            </rad:ChartSeriesItem> 
                            <rad:ChartSeriesItem YValue="97" Name="Item 100">  
                                <Appearance> 
                                    <FillStyle MainColor="Red" SecondColor="Yellow">  
                                    </FillStyle>                                                                                              
                                </Appearance>                                        
                            </rad:ChartSeriesItem> 
                            <rad:ChartSeriesItem YValue="143" Name="Item 20">  
                                <Appearance> 
                                    <FillStyle MainColor="Red" SecondColor="Yellow">  
                                    </FillStyle>                                                                                              
                                </Appearance>                                        
                            </rad:ChartSeriesItem> 
                        </Items>                                  
                    </rad:ChartSeries> 
                    <rad:ChartSeries Name="Clicks">  
                        <Items> 
                            <rad:ChartSeriesItem YValue="79" Name="Item 20">  
                                <Appearance> 
                                    <FillStyle MainColor="Green">  
                                    </FillStyle>                                                                                              
                                </Appearance>                                      
                            </rad:ChartSeriesItem> 
                            <rad:ChartSeriesItem YValue="43" Name="Item 100">  
                                <Appearance> 
                                    <FillStyle MainColor="Green">  
                                    </FillStyle>                                                                                              
                                </Appearance>                                      
                            </rad:ChartSeriesItem> 
                            <rad:ChartSeriesItem YValue="71" Name="Item 100">  
                                <Appearance> 
                                    <FillStyle MainColor="Green">  
                                    </FillStyle>                                                                                              
                                </Appearance>                                      
                            </rad:ChartSeriesItem> 
                            <rad:ChartSeriesItem YValue="98" Name="Item 20">  
                                <Appearance> 
                                    <FillStyle MainColor="Green">  
                                    </FillStyle>                                                                                              
                                </Appearance>                                      
                            </rad:ChartSeriesItem> 
                        </Items>                              
                    </rad:ChartSeries> 
                    <rad:ChartSeries Name="Leads">  
                        <Items> 
                            <rad:ChartSeriesItem YValue="13" Name="Item 20">  
                                <Appearance> 
                                    <FillStyle MainColor="Red">  
                                    </FillStyle>                                                                                              
                                </Appearance>                                      
                            </rad:ChartSeriesItem> 
                            <rad:ChartSeriesItem YValue="7" Name="Item 100">  
                                <Appearance> 
                                    <FillStyle MainColor="Red">  
                                    </FillStyle>                                                                                              
                                </Appearance>                                      
                            </rad:ChartSeriesItem> 
                            <rad:ChartSeriesItem YValue="19" Name="Item 100">  
                                <Appearance> 
                                    <FillStyle MainColor="Red">  
                                    </FillStyle>                                                                                              
                                </Appearance>                                      
                            </rad:ChartSeriesItem> 
                            <rad:ChartSeriesItem YValue="14" Name="Item 20">  
                                <Appearance> 
                                    <FillStyle MainColor="Red">  
                                    </FillStyle>                                                                                              
                                </Appearance>                                      
                            </rad:ChartSeriesItem> 
                        </Items>                              
                    </rad:ChartSeries> 
                </Series> 
            </rad:RadChart>          
        </td> 
    </tr> 
</table>      
    </div> 
    </form> 
</body> 
</html> 
 

3 Answers, 1 is accepted

Sort by
0
Tanuj
Top achievements
Rank 1
answered on 27 Feb 2008, 03:35 PM
any updates...?
0
Rajeev
Top achievements
Rank 1
answered on 28 Feb 2008, 06:29 AM
It's so disappointing thing. no body is supporting on telerik pie charts. even the telerik people are not looking on the post related to pie charts.

Do u have sample regarding how to create a pie chart with c# program and show if i have 4 chart series, how i will set label for each series i mean like the xaxis and label in charts.

0
Vlad
Telerik team
answered on 29 Feb 2008, 09:58 AM
Hello Rajeev,

Generally our forums are designed to be peer-to-peer communication in the community and if you want answer from a telerik support person you should open support ticket where you will get answer according to your support options.

As to the chart creation you can visit this thread:
http://www.telerik.com/community/forums/thread/b311D-kchtg.aspx

You can use also http://search.telerik.com to quickly look up in our resources (KB articles, Code Libraries, Help documentation, etc.

All the best,
Vlad
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Chart (Obsolete)
Asked by
Tanuj
Top achievements
Rank 1
Answers by
Tanuj
Top achievements
Rank 1
Rajeev
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or