예제 #1
0
        public AxisCategory(XmlSwfChartType chartType)
        {
            this.ChartType = chartType;

            this.ValueTypes.Add("skip", typeof(int));
            this.ValueTypes.Add("font", typeof(string));
            this.ValueTypes.Add("bold", typeof(bool));
            this.ValueTypes.Add("size", typeof(int));
            this.ValueTypes.Add("color", typeof(string));
            this.ValueTypes.Add("alpha", typeof(int));
            this.ValueTypes.Add("orientation", typeof(string));

            if (this.ChartType == XmlSwfChartType.Area ||
                this.ChartType == XmlSwfChartType.AreaStacked ||
                this.ChartType == XmlSwfChartType.Line)
            {
                this.ValueTypes.Add("margin", typeof(bool));
            }

            if (this.ChartType == XmlSwfChartType.Scatter)
            {
                this.ValueTypes.Add("min", typeof(float));
                this.ValueTypes.Add("max", typeof(float));
                this.ValueTypes.Add("steps", typeof(int));
                this.ValueTypes.Add("prefix", typeof(string));
                this.ValueTypes.Add("suffix", typeof(string));
                this.ValueTypes.Add("decimals", typeof(int));
                this.ValueTypes.Add("decimal_char", typeof(string));
                this.ValueTypes.Add("separator", typeof(string));
            }
        }
예제 #2
0
        public ChartPreferences(XmlSwfChartType chartType)
        {
            this.ChartType = chartType;

            if (chartType == XmlSwfChartType.Line)
            {
                this.ValueTypes.Add("line_thickness", typeof(int));
                this.ValueTypes.Add("point_shape", typeof(string));
                this.ValueTypes.Add("fill_shape", typeof(bool));
            }

            if (chartType == XmlSwfChartType.Bar ||
                chartType == XmlSwfChartType.BarFloating ||
                chartType == XmlSwfChartType.BarStacked)
            {
                this.ValueTypes.Add("reverse", typeof(bool));
            }

            if (chartType == XmlSwfChartType.Candlestick)
            {
                this.ValueTypes.Add("type", typeof(string));
                this.ValueTypes.Add("line_thickness", typeof(int));
                this.ValueTypes.Add("bull_color", typeof(string));
                this.ValueTypes.Add("bear_color", typeof(string));
            }

            if (chartType == XmlSwfChartType.Scatter)
            {
                this.ValueTypes.Add("point_size", typeof(int));
                this.ValueTypes.Add("point_shape", typeof(string));
                this.ValueTypes.Add("trend_thickness", typeof(int));
                this.ValueTypes.Add("trend_alpha", typeof(int));
                this.ValueTypes.Add("line_thickness", typeof(int));
                this.ValueTypes.Add("line_alpha", typeof(int));
            }

            if (chartType == XmlSwfChartType.Column3d ||
                chartType == XmlSwfChartType.ColumnParallel3d ||
                chartType == XmlSwfChartType.ColumnStacked3d ||
                chartType == XmlSwfChartType.Pie3d)
            {
                this.ValueTypes.Add("rotation_x", typeof(int));
                this.ValueTypes.Add("rotation_y", typeof(int));
            }

            if (chartType == XmlSwfChartType.Polar)
            {
                this.ValueTypes.Add("type", typeof(string));
                this.ValueTypes.Add("grid", typeof(string));
                this.ValueTypes.Add("line_thickness", typeof(int));
                this.ValueTypes.Add("point_shape", typeof(string));
                this.ValueTypes.Add("point_size", typeof(int));
                this.ValueTypes.Add("fill_shape", typeof(bool));
            }
        }
예제 #3
0
 private AxisCategory SetAxisCategory(XmlSwfChartType type)
 {
     AxisCategory ac = new AxisCategory(type);
     ac.Font = "Arial";
     ac.Bold = true;
     ac.Size = 16;
     ac.Color = "000000";
     ac.Alpha = 60;
     ac.Skip = 0;
     ac.Orientation = "vertical_up";
     return ac;
 }
예제 #4
0
 private AxisCategory SetAxisCategory(XmlSwfChartType xmlSwfChartType)
 {
     AxisCategory ac = new AxisCategory(xmlSwfChartType);
     ac.Font = "Arial";
     ac.Bold = true;
     ac.Size = 14;
     ac.Color = "86ab71";
     ac.Alpha = 100;
     ac.Skip = 0;
     ac.Orientation = "vertical_up";
     return ac;
 }
예제 #5
0
 private AxisCategory SetAxisCategory(XmlSwfChartType xmlSwfChartType)
 {
     AxisCategory ac = new AxisCategory(xmlSwfChartType);
     ac.Size = 10;
     ac.Color = "eebb66";
     ac.Alpha = 90;
     return ac;
 }
예제 #6
0
 private AxisCategory SetAxisCategory(XmlSwfChartType xmlSwfChartType)
 {
     AxisCategory ac = new AxisCategory(xmlSwfChartType);
     ac.Size = 11;
     ac.Color = "ffffff";
     ac.Alpha = 75;
     return ac;
 }
예제 #7
0
 private AxisCategory SetAxisCategory(XmlSwfChartType xmlSwfChartType)
 {
     AxisCategory ac = new AxisCategory(xmlSwfChartType);
     ac.Font = "Arial";
     ac.Bold = true;
     ac.Size = 13;
     ac.Color = "000022";
     ac.Alpha = 50;
     ac.Skip = 0;
     ac.Orientation = "diagonal_up";
     return ac;
 }
예제 #8
0
 private string GetChartTypeString(XmlSwfChartType type)
 {
     switch (type)
     {
         case XmlSwfChartType.ColumnStacked:
             return "stacked column";
         case XmlSwfChartType.ColumnFloating:
             return "floating column";
         case XmlSwfChartType.Column3d:
             return "3d column";
         case XmlSwfChartType.ColumnStacked3d:
             return "stacked 3d column";
         case XmlSwfChartType.ColumnParallel3d:
             return "parallel 3d column";
         case XmlSwfChartType.Pie3d:
             return "3d pie";
         case XmlSwfChartType.BarStacked:
             return "stacked bar";
         case XmlSwfChartType.BarFloating:
             return "floating bar";
         default:
             return Enum.GetName(typeof(XmlSwfChartType), type);
     }
 }
예제 #9
0
 public void AddChartType(XmlSwfChartType type)
 {
     if (this.ChartType == null) this.ChartType = new List<XmlSwfChartType>();
     this.ChartType.Add(type);
 }
예제 #10
0
 private AxisCategory SetAxisCategory(XmlSwfChartType xmlSwfChartType)
 {
     AxisCategory ac = new AxisCategory(xmlSwfChartType);
     ac.Font = "Arial";
     ac.Bold = true;
     ac.Size = 12;
     ac.Color = "ff8844";
     ac.Alpha = 85;
     ac.Skip = 0;
     return ac;
 }