Rev | Line | |
---|
[7849] | 1 | using System;
|
---|
| 2 | using System.Collections.Generic;
|
---|
| 3 | using System.Text;
|
---|
| 4 | using JsonFx.Json;
|
---|
| 5 |
|
---|
| 6 | namespace OpenFlashChart
|
---|
| 7 | {
|
---|
| 8 | public class ScatterValue
|
---|
| 9 | {
|
---|
| 10 | private double x;
|
---|
| 11 | private double y;
|
---|
| 12 | private int? dotsize;
|
---|
| 13 | private string dottype;
|
---|
| 14 | private string onclick;
|
---|
| 15 | public ScatterValue(double x, double y)
|
---|
| 16 | {
|
---|
| 17 | this.x = x;
|
---|
| 18 | this.y = y;
|
---|
| 19 | }
|
---|
| 20 | public ScatterValue(double x, double y, int dotsize)
|
---|
| 21 | {
|
---|
| 22 | this.x = x;
|
---|
| 23 | this.y = y;
|
---|
| 24 | if (dotsize > 0)
|
---|
| 25 | this.dotsize = dotsize;
|
---|
| 26 | //this.dottype = DotType.HOLLOW_DOT;
|
---|
| 27 | }
|
---|
| 28 |
|
---|
| 29 | [JsonProperty("x")]
|
---|
| 30 | public double X
|
---|
| 31 | {
|
---|
| 32 | get{return x;}
|
---|
| 33 | set{this.x=value;}
|
---|
| 34 | }
|
---|
| 35 | [JsonProperty("y")]
|
---|
| 36 | public double Y
|
---|
| 37 | {
|
---|
| 38 | get{return y;}
|
---|
| 39 | set{this.y=value;}
|
---|
| 40 | }
|
---|
| 41 | [JsonProperty("dot-size")]
|
---|
| 42 | public int DotSize
|
---|
| 43 | {
|
---|
| 44 | get{
|
---|
| 45 | if (dotsize == null)
|
---|
| 46 | return -1;
|
---|
| 47 |
|
---|
| 48 | return dotsize.Value;}
|
---|
| 49 | set{this.dotsize=value;}
|
---|
| 50 | }
|
---|
| 51 | [JsonProperty("type")]
|
---|
| 52 | public string DotType
|
---|
| 53 | {
|
---|
| 54 | get { return dottype; }
|
---|
| 55 | set { dottype = value; }
|
---|
| 56 | }
|
---|
| 57 | [JsonProperty("on-click")]
|
---|
| 58 | public string OnClick
|
---|
| 59 | {
|
---|
| 60 | get { return onclick; }
|
---|
| 61 | set { onclick = value; }
|
---|
| 62 | }
|
---|
| 63 | }
|
---|
| 64 | public class Scatter:Chart<ScatterValue>
|
---|
| 65 | {
|
---|
| 66 | private int? dotsize;
|
---|
| 67 | public Scatter()
|
---|
| 68 | {
|
---|
| 69 | this.ChartType = "scatter";
|
---|
| 70 | }
|
---|
| 71 | public Scatter(string color,int? dotsize)
|
---|
| 72 | {
|
---|
| 73 | this.ChartType = "scatter";
|
---|
| 74 | this.Colour = color;
|
---|
| 75 | this.dotsize = dotsize;
|
---|
| 76 | DotStyleType.Type = DotType.SOLID_DOT;
|
---|
| 77 | }
|
---|
| 78 | [JsonProperty("dot-size")]
|
---|
| 79 | public int? DotSize
|
---|
| 80 | {
|
---|
| 81 | get { return this.dotsize; }
|
---|
| 82 | set { this.dotsize = value; }
|
---|
| 83 | }
|
---|
| 84 | }
|
---|
| 85 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.