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

How to change of chart theme or font color

1 Answer 155 Views
Chart
This is a migrated thread and some comments may be shown as answers.
jaewoong
Top achievements
Rank 1
jaewoong asked on 08 Apr 2009, 06:52 AM
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));

        }

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

1 Answer, 1 is accepted

Sort by
0
Dwight
Telerik team
answered on 10 Apr 2009, 10:07 AM
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.
Tags
Chart
Asked by
jaewoong
Top achievements
Rank 1
Answers by
Dwight
Telerik team
Share this question
or