Exemple #1
0
        /// <summary>
        /// Create labels for DataPoint
        /// </summary>
        /// <param name="dataPoint">DataPoint</param>
        /// <returns>Border</returns>
        private static Border CreateLabelForDataPoint(DataPoint dataPoint, Boolean isStreamLine, Int32 sliceIndex)
        {
            Title title = new Title()
            {
                IsNotificationEnable = false,
                Chart = dataPoint.Chart,
                Text = dataPoint.TextParser(dataPoint.LabelText),
                InternalFontSize = (Double)dataPoint.LabelFontSize,
                InternalFontColor = (isStreamLine && sliceIndex == 0) ? Chart.CalculateDataPointLabelFontColor(dataPoint.Chart as Chart, dataPoint, null, LabelStyles.OutSide) : Chart.CalculateDataPointLabelFontColor(dataPoint.Chart as Chart, dataPoint, dataPoint.LabelFontColor, (LabelStyles)dataPoint.LabelStyle),
                InternalFontFamily = dataPoint.LabelFontFamily,
                InternalFontStyle = (FontStyle)dataPoint.LabelFontStyle,
                InternalFontWeight = (FontWeight)dataPoint.LabelFontWeight,
                InternalBackground = dataPoint.LabelBackground
            };

            // If its a StreamLine funnel then default size of the Title should be a bit bigger 
            if (isStreamLine && sliceIndex == 0 && dataPoint.GetValue(DataPoint.LabelFontSizeProperty) == null && dataPoint.Parent.GetValue(DataPoint.LabelFontSizeProperty) == null)
            {
                title.InternalFontSize = 11.5;
            }

            title.CreateVisualObject(new ElementData() { Element = dataPoint });

            if (!(Boolean)dataPoint.LabelEnabled)
                title.Visual.Visibility = Visibility.Collapsed;

            return title.Visual;
        }
        private static void UpdateDataPoint(DataPoint dataPoint, VcProperties property, object newValue)
        {
            if (property != VcProperties.Enabled)
            {
                if (dataPoint.Parent.Enabled == false || (Boolean)dataPoint.Enabled == false)
                {
                    return;
                }
            }

            Chart chart = dataPoint.Chart as Chart;

            if (chart == null)
                return;

            Marker marker = dataPoint.Marker;
            DataSeries dataSeries = dataPoint.Parent;
            PlotGroup plotGroup = dataSeries.PlotGroup;
            Double height = chart.ChartArea.ChartVisualCanvas.Height;
            Double width = chart.ChartArea.ChartVisualCanvas.Width;
            Double xPosition, yPosition;
            Canvas line2dLabelCanvas = null;

            xPosition = Graphics.ValueToPixelPosition(0, width, (Double)plotGroup.AxisX.InternalAxisMinimum, (Double)plotGroup.AxisX.InternalAxisMaximum, dataPoint.InternalXValue);
            yPosition = Graphics.ValueToPixelPosition(height, 0, (Double)plotGroup.AxisY.InternalAxisMinimum, (Double)plotGroup.AxisY.InternalAxisMaximum, dataPoint.InternalYValue);

            if (dataSeries.Faces != null)
            {
                line2dLabelCanvas = dataSeries.Faces.LabelCanvas as Canvas;
                ColumnChart.UpdateParentVisualCanvasSize(chart, line2dLabelCanvas);
            }

            switch (property)
            {
                case VcProperties.Color:
                    if (marker != null && (Boolean)dataPoint.MarkerEnabled)
                        marker.BorderColor = (dataPoint.GetValue(DataPoint.MarkerBorderColorProperty) as Brush == null) ? ((newValue != null) ? newValue as Brush : dataPoint.MarkerBorderColor) : dataPoint.MarkerBorderColor;
                    break;
                case VcProperties.Cursor:
                    dataPoint.SetCursor2DataPointVisualFaces();
                    break;

                case VcProperties.Href:
                case VcProperties.HrefTarget:
                    dataPoint.SetHref2DataPointVisualFaces();
                    break;

                case VcProperties.LabelBackground:
                    //if (marker != null)
                    //    marker.TextBackground = dataPoint.LabelBackground;
                    CreateLabel4LineDataPoint(dataPoint, width, height, dataPoint.InternalYValue >= 0, xPosition, yPosition,
                        ref line2dLabelCanvas, true);
                    break;

                case VcProperties.LabelEnabled:
                    //if (marker.LabelEnabled == false)
                    //CreateMarkerAForLineDataPoint(dataPoint, width, height, ref line2dLabelCanvas, out xPosition, out yPosition);
                    //else
                    //    marker.LabelEnabled = (Boolean)dataPoint.LabelEnabled;
                    CreateLabel4LineDataPoint(dataPoint, width, height, dataPoint.InternalYValue >= 0, xPosition, yPosition,
                        ref line2dLabelCanvas, true);
                    break;

                case VcProperties.LabelFontColor:
                    //if (marker != null)
                    //    marker.FontColor = dataPoint.LabelFontColor;
                    CreateLabel4LineDataPoint(dataPoint, width, height, dataPoint.InternalYValue >= 0, xPosition, yPosition,
                        ref line2dLabelCanvas, true);
                    break;

                case VcProperties.LabelFontFamily:
                    //CreateMarkerAForLineDataPoint(dataPoint, width, height, ref line2dLabelCanvas, out xPosition, out yPosition);
                    CreateLabel4LineDataPoint(dataPoint, width, height, dataPoint.InternalYValue >= 0, xPosition, yPosition,
                        ref line2dLabelCanvas, true);
                    // marker.FontFamily = dataPoint.LabelFontFamily;
                    break;

                case VcProperties.LabelFontStyle:
                    //CreateMarkerAForLineDataPoint(dataPoint, width, height, ref line2dLabelCanvas, out xPosition, out yPosition);
                    CreateLabel4LineDataPoint(dataPoint, width, height, dataPoint.InternalYValue >= 0, xPosition, yPosition,
                        ref line2dLabelCanvas, true);
                    //marker.FontStyle = (FontStyle) dataPoint.LabelFontStyle;
                    break;

                case VcProperties.LabelFontSize:
                    //CreateMarkerAForLineDataPoint(dataPoint, width, height, ref line2dLabelCanvas, out xPosition, out yPosition);
                    CreateLabel4LineDataPoint(dataPoint, width, height, dataPoint.InternalYValue >= 0, xPosition, yPosition,
                        ref line2dLabelCanvas, true);
                    // marker.FontSize = (Double) dataPoint.LabelFontSize;
                    break;

                case VcProperties.LabelFontWeight:
                    //if (marker != null)
                    //    marker.FontWeight = (FontWeight) dataPoint.LabelFontWeight;
                    CreateLabel4LineDataPoint(dataPoint, width, height, dataPoint.InternalYValue >= 0, xPosition, yPosition,
                        ref line2dLabelCanvas, true);
                    break;

                case VcProperties.LabelStyle:
                    //CreateMarkerAForLineDataPoint(dataPoint, width, height, ref line2dLabelCanvas, out xPosition, out yPosition);
                    CreateLabel4LineDataPoint(dataPoint, width, height, dataPoint.InternalYValue >= 0, xPosition, yPosition,
                        ref line2dLabelCanvas, true);
                    break;

                case VcProperties.LabelAngle:
                    //CreateMarkerAForLineDataPoint(dataPoint, width, height, ref line2dLabelCanvas, out xPosition, out yPosition);
                    CreateLabel4LineDataPoint(dataPoint, width, height, dataPoint.InternalYValue >= 0, xPosition, yPosition,
                        ref line2dLabelCanvas, true);
                    break;

                case VcProperties.LabelText:
                    //CreateMarkerAForLineDataPoint(dataPoint, width, height, ref line2dLabelCanvas, out xPosition, out yPosition);
                    CreateLabel4LineDataPoint(dataPoint, width, height, dataPoint.InternalYValue >= 0, xPosition, yPosition,
                        ref line2dLabelCanvas, true);
                    //marker.Text = dataPoint.TextParser(dataPoint.LabelText);
                    break;

                case VcProperties.LegendText:
                    chart.InvokeRender();
                    break;

                case VcProperties.LightingEnabled:
                    break;

                case VcProperties.MarkerBorderColor:
                    if (marker == null)
                        LineChart.CreateMarkerAForLineDataPoint(dataPoint, width, height, ref line2dLabelCanvas, out xPosition, out yPosition);
                    else
                    {
                        if ((Boolean)dataPoint.MarkerEnabled)
                            marker.BorderColor = dataPoint.MarkerBorderColor;
                    }

                    break;
                case VcProperties.MarkerBorderThickness:
                    LineChart.CreateMarkerAForLineDataPoint(dataPoint, width, height, ref line2dLabelCanvas, out xPosition, out yPosition);
                    // marker.BorderThickness = dataPoint.MarkerBorderThickness.Value.Left;

                    break;

                case VcProperties.MarkerColor:
                    if (marker != null && (Boolean)dataPoint.MarkerEnabled)
                        marker.MarkerFillColor = dataPoint.MarkerColor;
                    break;

                case VcProperties.MarkerEnabled:
                    LineChart.CreateMarkerAForLineDataPoint(dataPoint, width, height, ref line2dLabelCanvas, out xPosition, out yPosition);

                    //if((Boolean)dataPoint.MarkerEnabled)
                    //    ShowDataPointMarker(dataPoint);
                    //else
                    //    HideDataPointMarker(dataPoint);
                    break;

                case VcProperties.MarkerScale:
                case VcProperties.MarkerSize:
                case VcProperties.MarkerType:
                case VcProperties.ShadowEnabled:
                    //Double y = Graphics.ValueToPixelPosition(plotGroup.AxisY.Height, 0, plotGroup.AxisY.InternalAxisMinimum, plotGroup.AxisY.InternalAxisMaximum, dataPoint.InternalYValue);
                    //LineChart.GetMarkerForDataPoint(true, chart, y, dataPoint, dataPoint.InternalYValue > 0);
                    LineChart.CreateMarkerAForLineDataPoint(dataPoint, width, height, ref line2dLabelCanvas, out xPosition, out yPosition);

                    break;

                case VcProperties.Opacity:
                    if (marker != null)
                        marker.Visual.Opacity = (Double)dataPoint.Opacity * (Double)dataSeries.Opacity;
                    break;
                case VcProperties.ShowInLegend:
                    chart.InvokeRender();
                    break;
                case VcProperties.ToolTipText:
                case VcProperties.XValueFormatString:
                case VcProperties.YValueFormatString:
                    dataPoint._parsedToolTipText = dataPoint.TextParser(dataPoint.ToolTipText);
                    //CreateMarkerAForLineDataPoint(dataPoint, width, height, ref line2dLabelCanvas, out xPosition, out yPosition);
                    CreateLabel4LineDataPoint(dataPoint, width, height, dataPoint.InternalYValue >= 0, xPosition, yPosition,
                        ref line2dLabelCanvas, true);
                    break;
                case VcProperties.XValueType:
                    chart.InvokeRender();
                    break;

                case VcProperties.Enabled:
                    if ((Boolean)dataPoint.Parent.Enabled)
                        UpdateDataSeries(dataPoint, VcProperties.Enabled, newValue);
                    break;

                case VcProperties.XValue:
                    if (Double.IsNaN(dataPoint._oldYValue) || dataPoint.Faces == null) // Broken point of broken line
                        UpdateDataSeries(dataPoint.Parent, property, newValue);
                    else
                        UpdateXAndYValue(dataPoint, line2dLabelCanvas);
                    break;

                case VcProperties.YValue:
                case VcProperties.YValues:
                    if (Double.IsNaN(dataPoint._oldYValue) || Double.IsNaN(dataPoint.InternalYValue) || dataPoint.Faces == null) // Broken point of broken line
                        UpdateDataSeries(dataPoint.Parent, property, newValue);
                    else
                    {
                        //UpdateXAndYValue(dataPoint, ref line2dLabelCanvas);
                        chart.Dispatcher.BeginInvoke(new Action<DataPoint, Canvas>(UpdateXAndYValue), new object[] { dataPoint, line2dLabelCanvas });


                    }

                    break;
            }
        }
Exemple #3
0
        /// <summary>
        /// Update marker and legend for dataPoint
        /// </summary>
        /// <param name="Value">Color value</param>
        internal static void UpdateMarkerAndLegend(DataPoint dataPoint, object colorValue)
        {   
            Marker marker = dataPoint.Marker;

            if (marker != null && marker.Visual != null && (Boolean)dataPoint.MarkerEnabled)
            {   
                if (dataPoint.Parent.RenderAs == RenderAs.Point)
                {
                    marker.MarkerFillColor = dataPoint.Color; // (Brush)colorValue;

                    if (marker.MarkerType != MarkerTypes.Cross)
                    {
                        if (dataPoint.BorderColor != null)
                            marker.BorderColor = dataPoint.BorderColor;
                    }
                    else
                        marker.BorderColor = dataPoint.Color; // (Brush)colorValue;(Brush)colorValue;

                    // Marker.UpdateMarker();
                }
                else
                    marker.BorderColor = (dataPoint.GetValue(DataPoint.MarkerBorderColorProperty) as Brush == null) ? ((colorValue != null) ? colorValue as Brush : dataPoint.MarkerBorderColor) : dataPoint.MarkerBorderColor; // (Brush)colorValue;

                if (!dataPoint.Selected)
                    marker.UpdateMarker();
            }

            UpdateLegendMarker(dataPoint, colorValue as Brush);
        }
Exemple #4
0
        /// <summary>
        /// Apply or update Color for a CandleStick
        /// </summary>
        /// <param name="dataPoint">DataPoint</param>
        internal static void ApplyOrUpdateColorForACandleStick(DataPoint dataPoint)
        {   
            Faces dpFaces = dataPoint.Faces;
            Brush dataPointColor = (Brush)dataPoint.GetValue(DataPoint.ColorProperty);

            #region  Update Color for High-Low line and Open-Close rectangle

            Line highLowLine = dataPoint.Faces.VisualComponents[0] as Line;
            Rectangle openCloseRect = dataPoint.Faces.VisualComponents[1] as Rectangle;
            Brush highLowLineColor;
            Brush openCloseRectColor;
            openCloseRectColor = GetOpenCloseRectangleFillbrush(dataPoint, dataPointColor);

            if (dataPointColor == null)
                highLowLineColor = dataPoint.Parent.PriceUpColor;
            else
                highLowLineColor = dataPointColor;

            if ((Boolean)dataPoint.LightingEnabled)
            {
                openCloseRect.Fill = Graphics.GetLightingEnabledBrush(openCloseRectColor, "Linear", null);
                highLowLine.Stroke = Graphics.GetLightingEnabledBrush(highLowLineColor, "Linear", null);
            }
            else
            {
                openCloseRect.Fill = openCloseRectColor;
                highLowLine.Stroke = highLowLineColor;
            }
          
            #endregion

            #region Update Color for Bevel layer

            UpdateBevelLayerColor(dataPoint, openCloseRectColor);
            
            #endregion
        }
Exemple #5
0
        /// <summary>
        /// Apply or Update border for the DataPoint
        /// </summary>
        /// <param name="dataPoint"></param>
        /// <param name="dataPointWidth"></param>
        private static void ApplyOrUpdateBorder(DataPoint dataPoint, Double dataPointWidth)
        {   
            Faces dpFaces = dataPoint.Faces;
            Line highLowLine = dataPoint.Faces.VisualComponents[0] as Line;
            Rectangle openCloseRect = dpFaces.VisualComponents[1] as Rectangle;

            highLowLine.StrokeThickness = GetStrokeThickness(dataPoint, dataPointWidth);
            highLowLine.StrokeDashArray = Graphics.LineStyleToStrokeDashArray(dataPoint.BorderStyle.ToString());

            openCloseRect.StrokeThickness = dataPoint.BorderThickness.Left;
            openCloseRect.StrokeDashArray = Graphics.LineStyleToStrokeDashArray(dataPoint.BorderStyle.ToString());
            openCloseRect.Stroke = GetOpenCloseRectangleBorderbrush(dataPoint, (Brush)dataPoint.GetValue(DataPoint.ColorProperty));
        }
Exemple #6
0
        internal static void ApplyOrRemoveBevel(DataPoint dataPoint, Double dataPointWidth)
        {   
            // Removing parts of bevel
            Canvas bevelCanvas = null;
            Faces faces = dataPoint.Faces;
            Rectangle openCloseRect = faces.VisualComponents[1] as Rectangle;

            faces.ClearList(ref faces.BevelElements);

            // Create Bevel
            if (dataPoint.Parent.Bevel && dataPointWidth > 8 && openCloseRect.Height > 6)
            {
                Double reduceSize = openCloseRect.StrokeThickness;

                if (dataPoint.Parent.SelectionEnabled && dataPoint.BorderThickness.Left == 0)
                    reduceSize = 1.5 + reduceSize;

                if (openCloseRect.Width - 2 * reduceSize >= 0 && openCloseRect.Height - 2 * reduceSize >= 0)
                {
                    Brush color = GetOpenCloseRectangleFillbrush(dataPoint, (Brush) dataPoint.GetValue(DataPoint.ColorProperty));
                    bevelCanvas = ExtendedGraphics.Get2DRectangleBevel(dataPoint, openCloseRect.Width - 2 * reduceSize, openCloseRect.Height - 2 * reduceSize, 5, 5,
                       Graphics.GetBevelTopBrush(color),
                       Graphics.GetBevelSideBrush(((Boolean)dataPoint.LightingEnabled ? -70 : 0), color),
                       Graphics.GetBevelSideBrush(((Boolean)dataPoint.LightingEnabled ? -110 : 180), color),
                       Graphics.GetBevelSideBrush(90, color));

                    bevelCanvas.IsHitTestVisible = false;

                    bevelCanvas.SetValue(Canvas.TopProperty, (Double)openCloseRect.GetValue(Canvas.TopProperty) + reduceSize);
                    bevelCanvas.SetValue(Canvas.LeftProperty, reduceSize);

                    // Adding parts of bevel
                    foreach (FrameworkElement fe in bevelCanvas.Children)
                        dataPoint.Faces.BevelElements.Add(fe);

                    dataPoint.Faces.BevelElements.Add(bevelCanvas);

                    (dataPoint.Faces.Visual as Canvas).Children.Add(bevelCanvas);
                }
            }
        }
Exemple #7
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="dataPoint"></param>
        /// <param name="property"></param>
        /// <param name="newValue"></param>
        /// <param name="isAxisChanged"></param>
        private static void UpdateDataPoint(DataPoint dataPoint, VcProperties property, object newValue, Boolean isAxisChanged)
        {
            Chart chart = dataPoint.Chart as Chart;
            PlotDetails plotDetails = chart.PlotDetails;

            Marker marker = dataPoint.Marker;
            DataSeries dataSeries = dataPoint.Parent;
            PlotGroup plotGroup = dataSeries.PlotGroup;
            Canvas areaVisual = dataSeries.Faces.Visual as Canvas;
            Canvas labelCanvas = ((areaVisual as FrameworkElement).Parent as Panel).Children[0] as Canvas;
            Double height = chart.ChartArea.ChartVisualCanvas.Height;
            Double width = chart.ChartArea.ChartVisualCanvas.Width;
            Double xPosition, yPosition;
            Faces faces = dataPoint.Faces;

            switch (property)
            {    
                 case VcProperties.Bevel:
                     UpdateDataSeries(dataSeries, property, newValue);
                     break;

                case VcProperties.Color:
                case VcProperties.LightingEnabled:
                     if (property != VcProperties.LightingEnabled && marker != null && (Boolean)dataPoint.MarkerEnabled)
                         marker.BorderColor = (dataPoint.GetValue(DataPoint.MarkerBorderColorProperty) as Brush == null) ? ((newValue != null) ? newValue as Brush : dataPoint.MarkerBorderColor) : dataPoint.MarkerBorderColor;

                    if (faces != null)
                    {
                        if(dataPoint.Faces.BevelLine != null)
                            dataPoint.Faces.BevelLine.Stroke = Graphics.GetBevelTopBrush(dataPoint.Parent.Color);

                        Brush sideBrush = (Boolean)dataSeries.LightingEnabled ? Graphics.GetRightFaceBrush(dataSeries.Color) : dataSeries.Color;
                        Brush topBrush = (Boolean)dataSeries.LightingEnabled ? Graphics.GetTopFaceBrush(dataSeries.Color) : dataSeries.Color;

                        if (dataPoint.Faces.Area3DLeftFace != null)
                            (dataPoint.Faces.Area3DLeftFace.LeftFace as Path).Fill = sideBrush;

                        if (dataPoint.Faces.Area3DRightTopFace != null)
                            (dataPoint.Faces.Area3DRightTopFace.TopFace as Path).Fill = topBrush;

                        if (dataPoint.Faces.Area3DLeftTopFace != null)
                            (dataPoint.Faces.Area3DLeftTopFace.TopFace as Path).Fill = topBrush;

                        if (dataPoint.Faces.Area3DRightFace != null)
                            (dataPoint.Faces.Area3DRightFace.RightFace as Path).Fill = sideBrush;
                    }

                    break;

                case VcProperties.Opacity:

                    Double opacity = dataPoint.Opacity * dataSeries.Opacity;
                    if (marker != null)
                        marker.Visual.Opacity = opacity;

                    if (faces != null)
                    {   
                        if (dataPoint.Faces.BevelLine != null)
                            dataPoint.Faces.BevelLine.Opacity = opacity;

                        if (dataPoint.Faces.Area3DLeftFace != null)
                            (dataPoint.Faces.Area3DLeftFace.LeftFace as Path).Opacity = opacity;

                        if (dataPoint.Faces.Area3DRightTopFace != null)
                            (dataPoint.Faces.Area3DRightTopFace.TopFace as Path).Opacity = opacity;

                        if (dataPoint.Faces.Area3DLeftTopFace != null)
                            (dataPoint.Faces.Area3DLeftTopFace.TopFace as Path).Opacity = opacity;

                        if (dataPoint.Faces.Area3DRightFace != null)
                            (dataPoint.Faces.Area3DRightFace.RightFace as Path).Opacity = opacity;
                    }

                    break;
                case VcProperties.BorderColor:
                case VcProperties.BorderStyle:
                case VcProperties.BorderThickness:
                    if (faces != null)
                    {
                        if (dataPoint.Faces.Area3DLeftFace != null)
                            ApplyBorderProperties(dataPoint.Faces.Area3DLeftFace.LeftFace as Path, dataSeries);

                        if (dataPoint.Faces.Area3DRightTopFace != null)
                            ApplyBorderProperties(dataPoint.Faces.Area3DRightTopFace.TopFace as Path, dataSeries);

                        if (dataPoint.Faces.Area3DLeftTopFace != null)
                            ApplyBorderProperties(dataPoint.Faces.Area3DLeftTopFace.TopFace as Path, dataSeries);

                        if (dataPoint.Faces.Area3DRightFace != null)
                            ApplyBorderProperties(dataPoint.Faces.Area3DRightFace.RightFace as Path, dataSeries);
                    }

                    break;
                case VcProperties.Cursor:
                    dataPoint.SetCursor2DataPointVisualFaces();
                    break;

                case VcProperties.Href:
                case VcProperties.HrefTarget:
                    dataPoint.SetHref2DataPointVisualFaces();
                    break;

                case VcProperties.LabelBackground:
                    LineChart.CreateMarkerAForLineDataPoint(dataPoint, width, height, ref labelCanvas, out xPosition, out yPosition);
                    marker.TextBackground = dataPoint.LabelBackground;
                    break;

                case VcProperties.LabelEnabled:
                    LineChart.CreateMarkerAForLineDataPoint(dataPoint, width, height, ref labelCanvas, out xPosition, out yPosition);
                    break;

                case VcProperties.LabelFontColor:
                    marker.FontColor = dataPoint.LabelFontColor;
                    break;

                case VcProperties.LabelFontFamily:
                    LineChart.CreateMarkerAForLineDataPoint(dataPoint, width, height, ref labelCanvas, out xPosition, out yPosition);
                    // marker.FontFamily = dataPoint.LabelFontFamily;
                    break;

                case VcProperties.LabelFontStyle:
                    LineChart.CreateMarkerAForLineDataPoint(dataPoint, width, height, ref labelCanvas, out xPosition, out yPosition);

                    //marker.FontStyle = (FontStyle) dataPoint.LabelFontStyle;
                    break;

                case VcProperties.LabelFontSize:
                    LineChart.CreateMarkerAForLineDataPoint(dataPoint, width, height, ref labelCanvas, out xPosition, out yPosition);

                    // marker.FontSize = (Double) dataPoint.LabelFontSize;
                    break;

                case VcProperties.LabelFontWeight:
                    marker.FontWeight = (FontWeight)dataPoint.LabelFontWeight;
                    break;

                case VcProperties.LabelStyle:
                    LineChart.CreateMarkerAForLineDataPoint(dataPoint, width, height, ref labelCanvas, out xPosition, out yPosition);
                    break;

                case VcProperties.LabelText:
                    LineChart.CreateMarkerAForLineDataPoint(dataPoint, width, height, ref labelCanvas, out xPosition, out yPosition);
                    //marker.Text = dataPoint.TextParser(dataPoint.LabelText);
                    break;

                case VcProperties.LabelAngle:
                    LineChart.CreateMarkerAForLineDataPoint(dataPoint, width, height, ref labelCanvas, out xPosition, out yPosition);
                    //marker.Text = dataPoint.TextParser(dataPoint.LabelText);
                    break;

                case VcProperties.LegendText:
                    chart.InvokeRender();
                    break;

                case VcProperties.MarkerBorderColor:
                    LineChart.CreateMarkerAForLineDataPoint(dataPoint, width, height, ref labelCanvas, out xPosition, out yPosition);

                    //marker.BorderColor = dataPoint.MarkerBorderColor;
                    break;
                case VcProperties.MarkerBorderThickness:
                    LineChart.CreateMarkerAForLineDataPoint(dataPoint, width, height, ref labelCanvas, out xPosition, out yPosition);
                    //marker.BorderThickness = dataPoint.MarkerBorderThickness.Value.Left;
                    break;

                case VcProperties.MarkerColor:
                    if(marker != null && (Boolean) dataPoint.MarkerEnabled)
                        marker.MarkerFillColor = dataPoint.MarkerColor;
                    break;

                case VcProperties.MarkerEnabled:
                    LineChart.CreateMarkerAForLineDataPoint(dataPoint, width, height, ref labelCanvas, out xPosition, out yPosition);

                    // if((Boolean)dataPoint.MarkerEnabled)
                    //    ShowDataPointMarker(dataPoint);
                    // else
                    //    HideDataPointMarker(dataPoint);
                    break;

                case VcProperties.MarkerScale:
                case VcProperties.MarkerSize:
                case VcProperties.MarkerType:
                case VcProperties.ShadowEnabled:
                    // Double y = Graphics.ValueToPixelPosition(plotGroup.AxisY.Height, 0, plotGroup.AxisY.InternalAxisMinimum, plotGroup.AxisY.InternalAxisMaximum, dataPoint.InternalYValue);
                    // LineChart.GetMarkerForDataPoint(true, chart, y, dataPoint, dataPoint.InternalYValue > 0);
                    LineChart.CreateMarkerAForLineDataPoint(dataPoint, width, height, ref labelCanvas, out xPosition, out yPosition);
                    break;

              

                case VcProperties.ShowInLegend:
                    chart.InvokeRender();
                    break;

                case VcProperties.ToolTipText:
                case VcProperties.XValueFormatString:
                case VcProperties.YValueFormatString:
                    dataPoint._parsedToolTipText = dataPoint.TextParser(dataPoint.ToolTipText);
                    LineChart.CreateMarkerAForLineDataPoint(dataPoint, width, height, ref labelCanvas, out xPosition, out yPosition);
                    break;

                case VcProperties.XValueType:
                    chart.InvokeRender();
                    break;

                case VcProperties.Enabled:
                    UpdateDataSeries(dataSeries, property, newValue);
                    break;

                case VcProperties.XValue:
                    UpdateDataSeries(dataSeries, property, newValue);
                    break;

                case VcProperties.YValue:

                    if (isAxisChanged || dataPoint._oldYValue > 0 && dataPoint.InternalYValue < 0 || dataPoint._oldYValue < 0 && dataPoint.InternalYValue > 0)
                        UpdateDataSeries(dataSeries, property, newValue);
                    else
                    {
                        dataPoint._parsedToolTipText = dataPoint.TextParser(dataPoint.ToolTipText);
                        UpdateVisualForYValue4AreaChart(chart, dataPoint, isAxisChanged);
                        //chart.Dispatcher.BeginInvoke(new Action<Chart, DataPoint, Boolean>(UpdateVisualForYValue4AreaChart), new object[] { chart, dataPoint, isAxisChanged});

                    }

                    chart._toolTip.Hide();
                    // chart.Dispatcher.BeginInvoke(new Action<DataPoint>(UpdateXAndYValue), new object[]{dataPoint});

                    break;
            }
        }