package com.cooleshow.teacher.bean;

import java.io.Serializable;
import java.util.Arrays;
import java.util.List;

public class EarningDoughnutChartBean implements Serializable {

    /**
     * color : ["",]
     * toolbox : {"feature":{"saveAsImage":{"show":false}}}
     * tooltip : {"trigger":"item","formatter":"{b} : {c} ({d}%)"}
     * series : [{"name":"收入结构","type":"pie","radius":["40%","70%"],"avoidLabelOverlap":false,"label":{"show":false},"data":[{"value":200,"name":"课酬"}]}]
     */

    private ToolboxBean toolbox = new ToolboxBean();
    private TooltipBean tooltip = new TooltipBean();
    private List<String> color;
    private List<SeriesBean> series;

    public List<String> getColor() {
        return color;
    }

    public void setColor(List<String> color) {
        this.color = color;
    }

    public List<SeriesBean> getSeries() {
        return series;
    }

    public void setSeries(List<SeriesBean> series) {
        this.series = series;
    }

    public static class ToolboxBean implements Serializable {
        /**
         * feature : {"saveAsImage":{"show":false}}
         */

        private FeatureBean feature = new FeatureBean();

        public static class FeatureBean implements Serializable {
            /**
             * saveAsImage : {"show":false}
             */

            private SaveAsImageBean saveAsImage = new SaveAsImageBean();

            public static class SaveAsImageBean implements Serializable {
                /**
                 * show : false
                 */

                private boolean show = false;
            }
        }
    }

    public static class TooltipBean implements Serializable {
        /**
         * trigger : item
         * formatter : {b} : {c} ({d}%)
         */

        private String trigger = "item";
        private String formatter = "{b} : {c} ({d}%)";
        private int borderWidth = 0;
        private int padding = 3;
        private List<String> position = Arrays.asList("30%", "30%");

        /**
         * textStyle : {"fontSize":12}
         */

        private TextStyleBean textStyle = new TextStyleBean();

        public static class TextStyleBean implements Serializable {
            /**
             * fontSize : 12
             */

            private int fontSize = 12;
        }
    }

    public static class SeriesBean implements Serializable {
        /**
         * name : 收入结构
         * type : pie
         * radius : ["40%","70%"]
         * avoidLabelOverlap : false
         * label : {"show":false}
         * data : [{"value":200,"name":"课酬"}]
         */

        private String name;
        private String type = "pie";
        private boolean avoidLabelOverlap = false;
        private LabelBean label = new LabelBean();
        private List<String> radius = Arrays.asList("50%", "80%");
        private List<DataBean> data;

        public List<DataBean> getData() {
            return data;
        }

        public void setData(List<DataBean> data) {
            this.data = data;
        }

        public static class LabelBean implements Serializable {
            /**
             * show : false
             */

            private boolean show = false;
        }

        public static class DataBean implements Serializable {
            public DataBean(double value, String name) {
                this.value = value;
                this.name = name;
            }

            public double getValue() {
                return value;
            }

            public void setValue(double value) {
                this.value = value;
            }

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            /**
             * value : 200
             * name : 课酬
             */

            private double value;
            private String name;
        }
    }
}
