public void ProcessAddedPoint(Graph graph, Vector2D point) { viewport = graph.Viewport; DeriveExtremities(); AdjustViewport(point); graph.Viewport = viewport; }
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; }
public void Refresh(Graph graph) { if (graph.IsVisible && IsVisible) ShowAxes(graph); else HideAxes(); }
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); }
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, }); }
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 }); }
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)); }
private void CreateNewPercentileLabels(Graph graph) { for (int i = 0; i <= NumberOfPercentiles; i++) CreatePercentileLabel(graph, i); }
public void Refresh(Graph graph) { ClearOldPercentileLabels(); if (graph.IsVisible && IsVisible) CreateNewPercentileLabels(graph); }
//ncrunch: no coverage start public void Process(Graph graph) { if (MaximumNumberOfPoints > 0) foreach (GraphLine line in graph.Lines) PrunePointsFromLine(line); }
private void CreateNewKeyLabels(Graph graph) { for (int i = 0; i < graph.Lines.Count; i++) if (graph.Lines[i].Key != "") CreateKeyLabel(graph, i); }
public void Refresh(Graph graph) { ClearOldKeyLabels(); if (graph.IsVisible && IsVisible) CreateNewKeyLabels(graph); }
internal GraphLine(Graph graph) { this.graph = graph; }