Graph NumberOfPercentiles Property Delta Engine Documentation

Namespace: DeltaEngine.Rendering2D.Graphs
Assembly: DeltaEngine.Rendering2D.Graphs (in DeltaEngine.Rendering2D.Graphs.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public int NumberOfPercentiles { get; set; }

Property Value

Type: Int32
Remarks

Tests: DeltaEngine.Rendering2D.Graphs.Tests.GraphTests
Examples

4 unit tests call DeltaEngine.Rendering2D.Graphs.Graph.NumberOfPercentiles
[Test]
public void RenderFpsWithFivePercentiles()
{
    graph.Viewport = new Rectangle(0.0f, 0.0f, 10.0f, 60.0f);
    graph.NumberOfPercentiles = 5;
    graph.PercentileSuffix = "%";
    GraphLine line = graph.CreateLine("", LineColor);
    var fps = new FontText(Font.Default, "",
        new Rectangle(0.5f, 0.7f, 1.0f, 0.1f));
    graph.Add(line);
    graph.Add(fps);
    graph.Start<AddValueEveryFrame>();
}
[Test, CloseAfterFirstFrame]
public void ChangePercentilesVisibility()
{
    Assert.IsFalse(graph.PercentilesIsVisible);
    graph.PercentilesIsVisible = true;
    graph.NumberOfPercentiles = 2;
    Assert.IsTrue(graph.PercentilesIsVisible);
}
[Test, CloseAfterFirstFrame]
public void ChangeNumberOfPercentiles()
{
    Assert.AreEqual(0, graph.NumberOfPercentiles);
    graph.NumberOfPercentiles = 2;
    graph.NumberOfPercentiles = 2;
    Assert.AreEqual(2, graph.NumberOfPercentiles);
}
See Also