How to change of chart theme or font color

2 posts, 0 answers
  1. jaewoong
    jaewoong avatar
    1 posts
    Member since:
    Apr 2009

    Posted 08 Apr 2009 Link to this post

    Hello. 
    i have some question that using telerik silverlight tool.

    question one is i cann`t find method of changed legendlabel `s font color. and AxisX.TickPoints`sLabel font color.
        uhm. i did succeed change Chart area`s background color then white color. but i cann`t see any letter or character..
    that reason is i cann`t change legend Label color or Tickpoint Label color.
     please  show me method of change of these..

    regard.. Lee


    // page.xaml code //
    =======================================================================

    <Grid x:Name="LayoutRoot">
            <Grid.Background>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"  >
                    <GradientStop Color="#FFDCE7FD" Offset="1"/>
                    <GradientStop Color="#FF898AAC" Offset="0"/>
                </LinearGradientBrush>
            </Grid.Background>
           
            <control:RadChart x:Name="HistoryChart" Width="1006" Foreground="Blue" Background="White" >
                <chart:ChartArea x:Name="chartarea" VerticalAlignment="Stretch" ItemToolTipOpening="chartarea_ItemToolTipOpening"></chart:ChartArea>

            </control:RadChart>
    =======================================================================



    =====   CS code (C#) ================================================

            private void GethistroyPerson(string ParentProjectUid)
            {
                EndpointAddress address = SetWcfSvcUrl();

                ForecastServiceClient srvHistroyPerson = new ForecastServiceClient(binding, address);

                srvHistroyPerson.FUNC_Select_History_PersonCompleted += new EventHandler<FUNC_Select_History_PersonCompletedEventArgs>(srvHistroyPerson_FUNC_Select_History_PersonCompleted);
                srvHistroyPerson.FUNC_Select_History_PersonAsync(ParentProjectUid);
            }

            void srvHistroyPerson_FUNC_Select_History_PersonCompleted(object sender, FUNC_Select_History_PersonCompletedEventArgs e)
            {

                DataSeries BCWS = new DataSeries();
                DataSeries ACWP = new DataSeries();

                BCWS.Definition =  new LineSeriesDefinition();
                ACWP.Definition = new LineSeriesDefinition();

                BCWS.Definition.ShowItemToolTips = true;
                ACWP.Definition.ShowItemToolTips = true;

                BCWS.LegendLabel = "계획율";
                ACWP.LegendLabel = "실적율";

               

                BCWS.Definition.ShowItemLabels = true;
                ACWP.Definition.ShowItemToolTips = true;

                if (e.Result.Count > 0)
                {
                    for (int i = 0; i < e.Result.Count; i++)
                    {
                        BCWS.Add(new DataPoint
                        {
                            YValue = Convert.ToDouble(e.Result[i].BCWS.ToString())
                        });

                    }

                    for (int i = 0; i < e.Result.Count; i++)
                    {
                        ACWP.Add(new DataPoint
                        {
                            YValue = Convert.ToDouble(e.Result[i].ACWP.ToString())
                        });

                    }

                }

                this.HistoryChart.DefaultView.ChartArea.DataSeries.Add(BCWS);
                this.HistoryChart.DefaultView.ChartArea.DataSeries.Add(ACWP);
                this.HistoryChart.DefaultView.ChartLegend.Header = "";
               

                if (e.Result.Count > 0)
                {
                    for (int i = 0; i < e.Result.Count; i++)
                    {
                        HistoryChart.DefaultView.ChartArea.AxisX.TickPoints[i].Label = e.Result[i].SdateByWeek.ToString();
                       
                    }
                }
                Brush br = new SolidColorBrush(Color.FromArgb(255, 255, 255, 0));

            }

    ===========================================================================================

  2. Dwight
    Admin
    Dwight avatar
    475 posts

    Posted 10 Apr 2009 Link to this post

    Hi jaewoong,

    The current version does not allo change of the legend font color. In a couple of days we will release a service pack, that extends the styling abilities of the RadChart for Silverlight.

    Regards,
    Evtim
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Back to Top