public static string GetFormatString(ChartAxisFormatType type) { switch (type) { case ChartAxisFormatType.IntPercent: return("##%"); case ChartAxisFormatType.FloatPercent: return("##.##%"); } return(null); }
public RSerie(XmlNode parent) { //string _type = parent.Attributes["type"].Value; //if (string.Equals(_type, "column")) //{ // this.type = eChartType.ColumnStacked; //} //else if(string.Equals(_type, "line")) { // this.type = eChartType.Line; //} XmlElement ele = (XmlElement)parent; if (ele.HasAttribute("show_data_label")) { this.showDataLabel = bool.Parse(parent.Attributes["show_data_label"].Value); } if (ele.HasAttribute("color")) { try { this.colorString = parent.Attributes["color"].Value.TrimStart('#'); this.color = ColorTranslator.FromHtml("#" + this.colorString); } catch { this.colorString = null; } } // var d = parent.SelectSingleNode("xstart_row"); this.xAixs = parent.SelectSingleNode("xaixs").FirstChild.Value; this.yAixs = parent.SelectSingleNode("yaixs").FirstChild.Value; if (ele.HasAttribute("use_secondary_axis")) { this.useSecondaryAxis = bool.Parse(parent.Attributes["use_secondary_axis"].Value); } if (ele.HasAttribute("yaxis_format_type")) { this.yAxisFormatType = (ChartAxisFormatType)int.Parse(parent.Attributes["yaxis_format_type"].Value); } if (ele.HasAttribute("header_address")) { this.headerAddress = parent.Attributes["header_address"].Value; } }