Beispiel #1
0
        private void Serialize(PieChart control, DataStore data)
        {
            SerializeDefault(control);
            legend      = control.LegendLocation;
            InnerRadius = control.InnerRadius;
            chdata      = new ChartData(control.Series);
            ControlDef.Serialize(control);
            brush.Serialize(control, control.Background, data);
            Hoverable         = control.Hoverable;
            DataTooltipV      = control.DataTooltip.Visibility;
            PushOut           = control.HoverPushOut;
            LegendFontSize    = control.ChartLegend.FontSize;
            TooltipFontSize   = control.DataTooltip.FontSize;
            disableAnimations = control.DisableAnimations;
            LegendColor       = ((SolidColorBrush)control.ChartLegend.Foreground).Color;

            LegendBullet  = ((DefaultLegend)control.ChartLegend).BulletSize;
            TooltipBullet = ((DefaultTooltip)control.DataTooltip).BulletSize;

            if (control.SeriesColors != null)
            {
                SeriesColors = control.SeriesColors;
            }
            else
            {
                SeriesColors = null;
            }
        }
Beispiel #2
0
        private void Serialize(CartesianChart control, DataStore data)
        {
            if (control.Series.Count > 0)
            {
                if (control.Series[0] is ColumnSeries)
                {
                    CarType = ChartType.CartesianChart_Type.ColumnChart;
                }
                else if (control.Series[0] is StackedAreaSeries)
                {
                    CarType = ChartType.CartesianChart_Type.StackedAreaChart;
                }
                else if (control.Series[0] is LineSeries)
                {
                    CarType = ChartType.CartesianChart_Type.LineChart;
                }
                else if (control.Series[0] is RowSeries)
                {
                    CarType = ChartType.CartesianChart_Type.RowChart;
                }
                else if (control.Series[0] is StackedColumnSeries)
                {
                    CarType = ChartType.CartesianChart_Type.StackedColumnChart;
                }
                else if (control.Series[0] is StackedRowSeries)
                {
                    CarType = ChartType.CartesianChart_Type.StackedRowChart;
                }
                else if (control.Series[0] is StepLineSeries)
                {
                    CarType = ChartType.CartesianChart_Type.StepLineChart;
                }
            }

            SerializeDefault(control);
            legend = control.LegendLocation;
            chdata = new ChartData(control.Series);
            brush.Serialize(control, control.Background, data);
            axisSerializer.Serialize(control);

            Hoverable         = control.Hoverable;
            DataTooltipV      = control.DataTooltip.Visibility;
            LegendFontSize    = control.ChartLegend.FontSize;
            TooltipFontSize   = control.DataTooltip.FontSize;
            disableAnimations = control.DisableAnimations;

            LegendBullet  = ((DefaultLegend)control.ChartLegend).BulletSize;
            TooltipBullet = ((DefaultTooltip)control.DataTooltip).BulletSize;

            LegendColor = ((SolidColorBrush)control.ChartLegend.Foreground).Color;

            if (control.SeriesColors != null)
            {
                SeriesColors = control.SeriesColors;
            }
            else
            {
                SeriesColors = null;
            }
        }
Beispiel #3
0
 public void LoadDefault()
 {
     ShowChart          = Visibility.Visible;
     ShowCartesianChart = Visibility.Visible;
     LanguageList.Clear();
     LanguageList.Add(new PLStrings());
     LanguageList.Add(new EngStrings());
     SizeList.Clear();
     SizeList.Add(6);
     SizeList.Add(9);
     SizeList.Add(12);
     SizeList.Add(15);
     SizeList.Add(18);
     SizeList.Add(21);
     SizeList.Add(24);
     LanguageSet                  = new EngStrings();
     ChartLegendPosition          = LegendLocation.Bottom;
     CartesianChartLegendPosition = LegendLocation.None;
     ChoosedYear                  = DateTime.Now.Year;
     ChoosedYearDetails           = DateTime.Now.Year;
     CardSize = 6;
     LastOpen = 0;
 }
 public PieChartViewModel(List <string> labels, List <double> values) : base(labels, values)
 {
     LegendLocation = LegendLocation.Bottom;
 }
 public PieChartViewModel() : base()
 {
     LegendLocation = LegendLocation.Bottom;
 }
Beispiel #6
0
 /// <summary>
 /// Provides derived classes an opportunity to handle changes to the LegendLocation property.
 /// </summary>
 protected virtual void OnLegendLocationChanged(LegendLocation oldLegendLocation, LegendLocation newLegendLocation)
 {
 }