예제 #1
0
        private string ExportTypeToString(ChartExportType type)
        {
            switch (type)
            {
            case ChartExportType.JPEG:
                return("image/jpeg");

            case ChartExportType.PNG:
                return("image/png");

            case ChartExportType.SVG:
                return("image/svg+xml");
            }

            throw new Exception("Not supported export type");
        }
예제 #2
0
 /// <summary>
 /// Saves the chart by either triggering a download or returning a string containing the chart data. The action depends on the export type specified in the passed configuration.
 /// </summary>
 /// <param name="type"></param>
 /// <param name="width"></param>
 /// <param name="height"></param>
 public virtual void Save(ChartExportType type, int width, int height)
 {
     this.Call("save", new { type = this.ExportTypeToString(type), width, height });
 }
예제 #3
0
 /// <summary>
 /// Saves the chart by either triggering a download or returning a string containing the chart data. The action depends on the export type specified in the passed configuration.
 /// </summary>
 /// <param name="type"></param>
 public virtual void Save(ChartExportType type)
 {
     this.Call("save", new { type = this.ExportTypeToString(type) });
 }