Ejemplo n.º 1
0
        internal static void UpdateBubblePositionAccording2XandYValue(DataPoint dataPoint, Double drawingAreaWidth, Double drawingAreaHeight, Boolean animatedUpdate, Double oldSize, Double newSize)
        {
            dataPoint._parsedToolTipText = dataPoint.TextParser(dataPoint.ToolTipText);

            //animatedUpdate = false;
            Marker    marker    = dataPoint.Marker;
            PlotGroup plotGroup = dataPoint.Parent.PlotGroup;

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

            if (animatedUpdate)
            {
                Point newPosition = marker.CalculateActualPosition(xPosition, yPosition, new Point(0.5, 0.5));
                ApplyAnimation4XYZUpdate(dataPoint, newPosition, oldSize, newSize);

                //dataPoint.Storyboard.SpeedRatio = 2;
                //dataPoint.Storyboard.Begin();
            }
            else
            {
                marker.SetPosition(xPosition, yPosition, new Point(0.5, 0.5));
            }

            if (dataPoint.Parent.ToolTipElement != null)
            {
                dataPoint.Parent.ToolTipElement.Hide();
            }

            (dataPoint.Chart as Chart).ChartArea.DisableIndicators();

            dataPoint._visualPosition = new Point(xPosition, yPosition);
        }