Rev | Line | |
---|
[7849] | 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 AxisLabel
|
---|
| 10 | {
|
---|
| 11 | private string colour;
|
---|
| 12 | private string text;
|
---|
| 13 | private int size;
|
---|
| 14 | private string rotate;
|
---|
| 15 | private bool visible = true;
|
---|
| 16 | public AxisLabel()
|
---|
| 17 | {
|
---|
| 18 | this.visible = true;
|
---|
| 19 | size = 12;
|
---|
| 20 | }
|
---|
| 21 | public AxisLabel(string text)
|
---|
| 22 | {
|
---|
| 23 | this.text = text;
|
---|
| 24 | this.visible = true;
|
---|
| 25 | size = 12;
|
---|
| 26 | }
|
---|
| 27 | public static implicit operator AxisLabel(string text)
|
---|
| 28 | {
|
---|
| 29 | return new AxisLabel(text);
|
---|
| 30 | }
|
---|
| 31 | public AxisLabel(string text, string colour, int size, string rotate)
|
---|
| 32 | {
|
---|
| 33 | this.text = text;
|
---|
| 34 | this.colour = colour;
|
---|
| 35 | this.size = size;
|
---|
| 36 | this.rotate = rotate;
|
---|
| 37 |
|
---|
| 38 | this.visible = true;
|
---|
| 39 | }
|
---|
| 40 | [JsonProperty("colour")]
|
---|
| 41 | public string Color
|
---|
| 42 | {
|
---|
| 43 | set { this.colour = value; }
|
---|
| 44 | get { return this.colour; }
|
---|
| 45 | }
|
---|
| 46 | [JsonProperty("text")]
|
---|
| 47 | public string Text
|
---|
| 48 | {
|
---|
| 49 | set { this.text = value; }
|
---|
| 50 | get { return this.text; }
|
---|
| 51 | }
|
---|
| 52 | [JsonProperty("size")]
|
---|
| 53 | public int Size
|
---|
| 54 | {
|
---|
| 55 | set { this.size = value; }
|
---|
| 56 | get { return this.size; }
|
---|
| 57 | }
|
---|
| 58 | [JsonProperty("rotate")]
|
---|
| 59 | public string Rotate
|
---|
| 60 | {
|
---|
| 61 | set { this.rotate = value; }
|
---|
| 62 | get { return this.rotate; }
|
---|
| 63 | }
|
---|
| 64 | [JsonIgnore]
|
---|
| 65 | public bool Vertical
|
---|
| 66 | {
|
---|
| 67 | set {
|
---|
| 68 | if(value)
|
---|
| 69 | this.rotate = "vertical";
|
---|
| 70 | }
|
---|
| 71 | }
|
---|
| 72 | [JsonProperty("visible")]
|
---|
| 73 | public bool Visible
|
---|
| 74 | {
|
---|
| 75 | set { this.visible = value; }
|
---|
| 76 | get { return this.visible; }
|
---|
| 77 | }
|
---|
| 78 |
|
---|
| 79 | }
|
---|
| 80 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.