source: code/Website/dot-net-library/written-by-xiao-yifang/OpenFlashChart/BarStack.cs@ 7937

Last change on this file since 7937 was 7849, checked in by dennisw, 15 years ago
File size: 1.3 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Text;
4using JsonFx.Json;
5
6
7namespace OpenFlashChart
8{
9 public class BarStackValue
10 {
11 private string colour;
12 private double val;
13 public BarStackValue(double val,string color)
14 {
15 this.Colour = color;
16 this.Val = val;
17 }
18 public BarStackValue(double val)
19 {
20 this.Val = val;
21 }
22 public BarStackValue()
23 {
24
25 }
26 public static implicit operator BarStackValue(double val)
27 {
28 return new BarStackValue(val);
29 }
30 [JsonProperty("colour")]
31 public string Colour
32 {
33 get { return colour; }
34 set { colour = value; }
35 }
36 [JsonProperty("val")]
37 public double Val
38 {
39 get { return val; }
40 set { val = value; }
41 }
42 }
43 public class BarStack:BarBase
44 {
45 public BarStack()
46 {
47 this.ChartType = "bar_stack";
48 }
49 public void Add(BarStackValue barStackValue)
50 {
51 this.Values.Add(barStackValue);
52 }
53 public void AddStack(List<BarStackValue> barStackValues)
54 {
55 base.Values.Add(barStackValues);
56 }
57 }
58}
Note: See TracBrowser for help on using the repository browser.