Ejemplo n.º 1
0
		public void ProcessAddedPoint(Graph graph, Vector2D point)
		{
			viewport = graph.Viewport;
			DeriveExtremities();
			AdjustViewport(point);
			graph.Viewport = viewport;
		}
Ejemplo n.º 2
0
		private string GetPercentileLabelText(Graph graph, int index)
		{
			float value = graph.Viewport.Top + index * graph.Viewport.Height / NumberOfPercentiles;
			if (ArePercentileLabelsInteger)
				value = (int)value;
			return PercentilePrefix + value + PercentileSuffix;
		}
Ejemplo n.º 3
0
		public void Refresh(Graph graph)
		{
			if (graph.IsVisible && IsVisible)
				ShowAxes(graph);
			else
				HideAxes();
		}
Ejemplo n.º 4
0
		private void CreatePercentile(Graph graph, int index)
		{
			Line2D percentile = CreateBlankPercentile();
			percentile.StartPoint = GetPercentileStartPoint(graph, index);
			percentile.EndPoint = GetPercentileEndPoint(graph, index);
			percentile.Color = PercentileColor;
			percentile.RenderLayer = graph.RenderLayer + RenderLayerOffset;
			percentile.IsVisible = true;
			Percentiles.Add(percentile);
		}
Ejemplo n.º 5
0
		private void CreatePercentileLabel(Graph graph, int index)
		{
			PercentileLabels.Add(new FontText(Font.Default, GetPercentileLabelText(graph, index),
				GetPercentileLabelDrawArea(graph, index))
			{
				RenderLayer = graph.RenderLayer + RenderLayerOffset,
				Color = PercentileLabelColor,
				HorizontalAlignment = HorizontalAlignment.Left,
				VerticalAlignment = VerticalAlignment.Center,
			});
		}
Ejemplo n.º 6
0
		private void CreateKeyLabel(Graph graph, int index)
		{
			keyLabels.Add(new FontText(Font.Default, graph.Lines[index].Key,
				GetKeyLabelDrawArea(graph, index))
			{
				RenderLayer = graph.RenderLayer + RenderLayerOffset,
				Color = graph.Lines[index].Color,
				HorizontalAlignment = HorizontalAlignment.Left,
				VerticalAlignment = VerticalAlignment.Top
			});
		}
Ejemplo n.º 7
0
		private void ShowAxes(Graph graph)
		{
			renderLayer = graph.RenderLayer + RenderLayerOffset;
			viewport = graph.Viewport;
			drawArea = graph.DrawArea;
			clippingBounds = Rectangle.FromCorners(
				ToQuadratic(viewport.BottomLeft, viewport, drawArea),
				ToQuadratic(viewport.TopRight, viewport, drawArea));
			Vector2D origin = graph.Origin;
			SetAxis(XAxis, ToQuadratic(new Vector2D(viewport.Left, origin.Y), viewport, drawArea),
				ToQuadratic(new Vector2D(viewport.Right, origin.Y), viewport, drawArea));
			SetAxis(YAxis, ToQuadratic(new Vector2D(origin.X, viewport.Top), viewport, drawArea),
				ToQuadratic(new Vector2D(origin.X, viewport.Bottom), viewport, drawArea));
		}
Ejemplo n.º 8
0
		private void CreateNewPercentileLabels(Graph graph)
		{
			for (int i = 0; i <= NumberOfPercentiles; i++)
				CreatePercentileLabel(graph, i);
		}
Ejemplo n.º 9
0
		public void Refresh(Graph graph)
		{
			ClearOldPercentileLabels();
			if (graph.IsVisible && IsVisible)
				CreateNewPercentileLabels(graph);
		}
Ejemplo n.º 10
0
		//ncrunch: no coverage start
		public void Process(Graph graph)
		{
			if (MaximumNumberOfPoints > 0)
				foreach (GraphLine line in graph.Lines)
					PrunePointsFromLine(line);
		}
Ejemplo n.º 11
0
		private void CreateNewKeyLabels(Graph graph)
		{
			for (int i = 0; i < graph.Lines.Count; i++)
				if (graph.Lines[i].Key != "")
					CreateKeyLabel(graph, i);
		}
Ejemplo n.º 12
0
		public void Refresh(Graph graph)
		{
			ClearOldKeyLabels();
			if (graph.IsVisible && IsVisible)
				CreateNewKeyLabels(graph);
		}
Ejemplo n.º 13
0
		internal GraphLine(Graph graph)
		{
			this.graph = graph;
		}