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 AxisLabels
|
---|
| 10 | {
|
---|
| 11 | private int? steps;
|
---|
| 12 | protected IList<object> labels;
|
---|
| 13 | private string colour;
|
---|
| 14 | private string rotate;
|
---|
| 15 | private int? fontsize;
|
---|
| 16 | private int? visiblesteps;
|
---|
| 17 |
|
---|
| 18 | private string formatstring;
|
---|
| 19 |
|
---|
| 20 | [JsonProperty("steps")]
|
---|
| 21 | public int? Steps
|
---|
| 22 | {
|
---|
| 23 | get
|
---|
| 24 | {
|
---|
| 25 | if (this.steps == null)
|
---|
| 26 | return null;
|
---|
| 27 | return this.steps;
|
---|
| 28 | }
|
---|
| 29 | set { this.steps = value; }
|
---|
| 30 | }
|
---|
| 31 | [JsonProperty("labels")]
|
---|
| 32 | [Obsolete("just for json generation,not used.Use SetLabels()")]
|
---|
| 33 | public IList<object> AxisLabelValues
|
---|
| 34 | {
|
---|
| 35 | get { return labels; }
|
---|
| 36 | set { this.labels = value; }
|
---|
| 37 | }
|
---|
| 38 | public virtual void SetLabels(IList<string> labelsvalue)
|
---|
| 39 | {
|
---|
| 40 | if (labels == null)
|
---|
| 41 | labels = new List<object>();
|
---|
| 42 | foreach (string s in labelsvalue)
|
---|
| 43 | {
|
---|
| 44 | labels.Add(s);
|
---|
| 45 | }
|
---|
| 46 | }
|
---|
| 47 | public void Add(AxisLabel label)
|
---|
| 48 | {
|
---|
| 49 | if (labels == null)
|
---|
| 50 | labels = new List<object>();
|
---|
| 51 | labels.Add(label);
|
---|
| 52 | }
|
---|
| 53 | [JsonProperty("colour")]
|
---|
| 54 | public string Color
|
---|
| 55 | {
|
---|
| 56 | set { this.colour = value; }
|
---|
| 57 | get { return this.colour; }
|
---|
| 58 | }
|
---|
| 59 | [JsonProperty("rotate")]
|
---|
| 60 | public string Rotate
|
---|
| 61 | {
|
---|
| 62 | set { this.rotate = value; }
|
---|
| 63 | get { return this.rotate; }
|
---|
| 64 | }
|
---|
| 65 | [JsonIgnore]
|
---|
| 66 | public bool Vertical
|
---|
| 67 | {
|
---|
| 68 | set
|
---|
| 69 | {
|
---|
| 70 | if (value)
|
---|
| 71 | this.rotate = "vertical";
|
---|
| 72 | }
|
---|
| 73 | }
|
---|
| 74 | [JsonProperty("size")]
|
---|
| 75 | public int? FontSize
|
---|
| 76 | {
|
---|
| 77 | get { return fontsize; }
|
---|
| 78 | set { fontsize = value; }
|
---|
| 79 | }
|
---|
| 80 | [JsonProperty("text")]
|
---|
| 81 | public string FormatString
|
---|
| 82 | {
|
---|
| 83 | get { return formatstring; }
|
---|
| 84 | set { formatstring = value; }
|
---|
| 85 | }
|
---|
| 86 | [JsonProperty("visible-steps")]
|
---|
| 87 | public int? VisibleSteps
|
---|
| 88 | {
|
---|
| 89 | get { return visiblesteps; }
|
---|
| 90 | set { visiblesteps = value; }
|
---|
| 91 | }
|
---|
| 92 | }
|
---|
| 93 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.