示例#1
0
        public int AddSeries(string label, FlotChartSeries lines, int?xaxis = 1, int?yaxis = 1)
        {
            FlotChartItem fci = FlotChartItem.CreateNew(label, lines);

            fci.xaxis = xaxis;
            fci.yaxis = yaxis;
            base.Add(fci);
            return(base.Count - 1);
        }
示例#2
0
 public static FlotChartItem CreateNew(string label, FlotChartSeries series)
 {
     if (series is FlotChartLine)
     {
         return(new FlotChartItemLine(label, series));
     }
     else if (series is FlotChartDashed)
     {
         return(new FlotChartItemDashes(label, series));
     }
     else if (series is FlotChartBar)
     {
         return(new FlotChartItemBar(label, series));
     }
     else
     {
         throw new Exception("unknown flot chart series type : " + series.GetType().ToString());
     }
 }
示例#3
0
 public FlotChartItemBar(string label, FlotChartSeries series)
 {
     this.label = label;
     this.bars  = (FlotChartBar)series;
 }
示例#4
0
 public FlotChartItemDashes(string label, FlotChartSeries series)
 {
     this.label = label;
     this.lines = (FlotChartDashed)series;
 }
示例#5
0
 public FlotChartItemLine(string label, FlotChartSeries series)
 {
     this.label = label;
     this.lines = (FlotChartLine)series;
 }