| Line | |
|---|
| 1 | using System;
|
|---|
| 2 | using System.Collections.Generic;
|
|---|
| 3 | using System.Text;
|
|---|
| 4 | using JsonFx.Json;
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 | namespace OpenFlashChart
|
|---|
| 8 | {
|
|---|
| 9 | public class Axis
|
|---|
| 10 | {
|
|---|
| 11 | private int? stroke;
|
|---|
| 12 | private string colour;
|
|---|
| 13 | private string gridColour;
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 | private int? steps;
|
|---|
| 17 | private int _3D;
|
|---|
| 18 |
|
|---|
| 19 | private double? min;
|
|---|
| 20 | private double? max;
|
|---|
| 21 | private bool offset;
|
|---|
| 22 | public Axis()
|
|---|
| 23 | {
|
|---|
| 24 | offset = true;
|
|---|
| 25 | }
|
|---|
| 26 | [JsonProperty("stroke")]
|
|---|
| 27 | public int? Stroke
|
|---|
| 28 | {
|
|---|
| 29 | set { this.stroke = value; }
|
|---|
| 30 | get { return this.stroke; }
|
|---|
| 31 | }
|
|---|
| 32 | [JsonProperty("colour")]
|
|---|
| 33 | public string Colour
|
|---|
| 34 | {
|
|---|
| 35 | set { this.colour = value; }
|
|---|
| 36 | get { return this.colour; }
|
|---|
| 37 | }
|
|---|
| 38 | [JsonProperty("grid-colour")]
|
|---|
| 39 | public string GridColour
|
|---|
| 40 | {
|
|---|
| 41 | set { this.gridColour = value; }
|
|---|
| 42 | get { return this.gridColour; }
|
|---|
| 43 | }
|
|---|
| 44 | [JsonProperty("steps")]
|
|---|
| 45 | public int? Steps
|
|---|
| 46 | {
|
|---|
| 47 | set { steps = value; }
|
|---|
| 48 | get { return this.steps; }
|
|---|
| 49 | }
|
|---|
| 50 |
|
|---|
| 51 |
|
|---|
| 52 | public void SetColors(string color,string gridcolor)
|
|---|
| 53 | {
|
|---|
| 54 | this.colour = color;
|
|---|
| 55 | this.gridColour = gridcolor;
|
|---|
| 56 | }
|
|---|
| 57 | public void Set3D(int width)
|
|---|
| 58 | {
|
|---|
| 59 | this.Axis3D = width;
|
|---|
| 60 | }
|
|---|
| 61 |
|
|---|
| 62 | [JsonProperty("min")]
|
|---|
| 63 | public double? Min
|
|---|
| 64 | {
|
|---|
| 65 | get { return min; }
|
|---|
| 66 | set { this.min = value; }
|
|---|
| 67 | }
|
|---|
| 68 | [JsonProperty("max")]
|
|---|
| 69 | public double? Max
|
|---|
| 70 | {
|
|---|
| 71 | get { return max; }
|
|---|
| 72 | set { this.max = value; }
|
|---|
| 73 | }
|
|---|
| 74 | [JsonProperty("3d")]
|
|---|
| 75 | public int Axis3D
|
|---|
| 76 | {
|
|---|
| 77 | get { return _3D; }
|
|---|
| 78 | set { _3D = value; }
|
|---|
| 79 | }
|
|---|
| 80 |
|
|---|
| 81 | [JsonProperty("offset")]
|
|---|
| 82 | public bool Offset
|
|---|
| 83 | {
|
|---|
| 84 | set { offset = value; }
|
|---|
| 85 | get { return offset; }
|
|---|
| 86 | }
|
|---|
| 87 |
|
|---|
| 88 |
|
|---|
| 89 |
|
|---|
| 90 | public void SetRange(double? min, double? max)
|
|---|
| 91 | {
|
|---|
| 92 | Max = max;
|
|---|
| 93 | Min = min;
|
|---|
| 94 | }
|
|---|
| 95 | }
|
|---|
| 96 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.