⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pie.cs

📁 Open Flash Chart is a program for creating charts in Flash to display in Web pages. You can create b
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.Text;
using JsonFx.Json;


namespace OpenFlashChart
{
    public class PieValue
    {
        private double val;
        private string text;
        public PieValue(double val)
        {
            this.val = val;
        }
        public static implicit operator PieValue(double val)
        {
            return new PieValue(val,"");
        }
        public PieValue(double val, string text)
        {
            this.val = val;
            this.Text = text;
        }
        [JsonProperty("value")]
        public double Value
        {
            get { return val; }
            set { val = value; }
        }
        [JsonProperty("text")]
        public string Text
        {
            get { return text; }
            set { text = value; }
        }
    }
    public class Pie : Chart<PieValue>
    {
        private int border;
        private IEnumerable<String> colours;
        private double alpha;
        private bool animate;
        private double start_angle;

        public Pie()
        {
            this.ChartType = "pie";
            this.border = 2;
            this.colours = new string[] { "#d01f3c", "#356aa0", "#C79810" };
            this.alpha = 0.6;
            this.animate = true;

        }
        [JsonProperty("colours")]
        public IEnumerable<string> Colours
        {
            get { return this.colours; }
            set
            {
                this.colours = value;
            }
        }
        [JsonProperty("border")]
        public int Border
        {
            get { return border; }
            set { border = value; }
        }
        [JsonProperty("alpha")]
        public double Alpha
        {
            get { return alpha; }
            set { alpha = value; }
        }
        [JsonProperty("animate")]
        public bool Animate
        {
            get { return animate; }
            set { animate = value; }
        }
        [JsonProperty("start-angle")]
        public double StartAngle
        {
            get { return start_angle; }
            set { start_angle = value; }
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -