| Line | |
|---|
| 1 | using System;
|
|---|
| 2 | using System.Collections.Generic;
|
|---|
| 3 | using System.Text;
|
|---|
| 4 | using JsonFx.Json;
|
|---|
| 5 |
|
|---|
| 6 | namespace OpenFlashChart
|
|---|
| 7 | {
|
|---|
| 8 | public class BarValue
|
|---|
| 9 | {
|
|---|
| 10 | protected double? bottom;
|
|---|
| 11 | protected double? top;
|
|---|
| 12 | protected string color;
|
|---|
| 13 | protected string tip;
|
|---|
| 14 | private string onclick;
|
|---|
| 15 | public BarValue()
|
|---|
| 16 | {
|
|---|
| 17 |
|
|---|
| 18 | }
|
|---|
| 19 | public BarValue(double top)
|
|---|
| 20 | {
|
|---|
| 21 | this.top = top;
|
|---|
| 22 | }
|
|---|
| 23 | public BarValue(double top,double bottom)
|
|---|
| 24 | {
|
|---|
| 25 | this.bottom = bottom;
|
|---|
| 26 | this.top = top;
|
|---|
| 27 | }
|
|---|
| 28 | [JsonProperty("bottom")]
|
|---|
| 29 | public double? Bottom
|
|---|
| 30 | {
|
|---|
| 31 | get { return bottom; }
|
|---|
| 32 | set { bottom = value; }
|
|---|
| 33 | }
|
|---|
| 34 | [JsonProperty("top")]
|
|---|
| 35 | public double? Top
|
|---|
| 36 | {
|
|---|
| 37 | get { return top; }
|
|---|
| 38 | set { top = value; }
|
|---|
| 39 | }
|
|---|
| 40 | [JsonProperty("colour")]
|
|---|
| 41 | public string Color
|
|---|
| 42 | {
|
|---|
| 43 | get { return color; }
|
|---|
| 44 | set { color = value; }
|
|---|
| 45 | }
|
|---|
| 46 | [JsonProperty("tip")]
|
|---|
| 47 | public string Tip
|
|---|
| 48 | {
|
|---|
| 49 | get { return tip; }
|
|---|
| 50 | set { tip = value; }
|
|---|
| 51 | }
|
|---|
| 52 | [JsonProperty("on-click")]
|
|---|
| 53 | public string OnClick
|
|---|
| 54 | {
|
|---|
| 55 | get { return onclick; }
|
|---|
| 56 | set { onclick = value; }
|
|---|
| 57 | }
|
|---|
| 58 | }
|
|---|
| 59 | public class Bar:BarBase
|
|---|
| 60 | {
|
|---|
| 61 | public Bar()
|
|---|
| 62 | {
|
|---|
| 63 | this.ChartType = "bar";
|
|---|
| 64 | }
|
|---|
| 65 | /// <summary>
|
|---|
| 66 | ///
|
|---|
| 67 | /// </summary>
|
|---|
| 68 | [JsonIgnore]
|
|---|
| 69 | public string BarType
|
|---|
| 70 | {
|
|---|
| 71 | get { return this.ChartType; }
|
|---|
| 72 | set { this.ChartType = value; }
|
|---|
| 73 | }
|
|---|
| 74 |
|
|---|
| 75 | public void Add(BarValue barValue)
|
|---|
| 76 | {
|
|---|
| 77 | this.Values.Add(barValue);
|
|---|
| 78 | }
|
|---|
| 79 |
|
|---|
| 80 | }
|
|---|
| 81 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.