         map["height"] = height
     }
 }
-
-// MARK: - SECToolbox.IconStyle
-extension SECToolbox {
-    public struct IconStyleContent : SECOpacitable {
-        public var color: SECColor?
-        public var borderColor: SECColor?
-        public var borderWidth: Float?
-        public var borderType: SECLineType?
-        public var shadowBlur: Float?
-        public var shadowColor: SECColor?
-        public var shadowOffsetX: Float?
-        public var shadowOffsetY: Float?
-        public var opacity: Float? {
-            didSet {
-                validateOpacity()
-            }
-        }
-        /// 文本位置，'left' / 'right' / 'top' / 'bottom'。
-        public var textPosition: SECPosition?
-        /// 文本对齐方式，'left' / 'right'。
-        public var textAlign: SECAlign?
-        
-        public init() { }
-    }
-    
-    public struct IconStyle : SECEmphasisable {
-        public typealias Style = IconStyleContent
-        
-        public var normal: Style?
-        public var emphasis: Style?
-        
-        public init() { }
-    }
-}
-
-extension SECToolbox.IconStyleContent : SECEnumable {
-    public enum Enums {
-        case color(SECColor), borderColor(SECColor), borderWidth(Float), borderType(SECLineType), shadowBlur(Float), shadowColor(SECColor), shadowOffsetX(Float), shadowOffsetY(Float), opacity(Float), textPosition(SECPosition), textAlign(SECAlign)
-    }
-    
-    public typealias ContentEnum = Enums
-    
-    public init(_ elements: Enums...) {
-        for ele in elements {
-            switch ele {
-            case let .color(color):
-                self.color = color
-            case let .borderColor(color):
-                self.borderColor = color
-            case let .borderWidth(width):
-                self.borderWidth = width
-            case let .borderType(borderType):
-                self.borderType = borderType
-            case let .shadowBlur(blur):
-                self.shadowBlur = blur
-            case let .shadowColor(color):
-                self.shadowColor = color
-            case let .shadowOffsetX(x):
-                self.shadowOffsetX = x
-            case let .shadowOffsetY(y):
-                self.shadowOffsetY = y
-            case let .opacity(opacity):
-                self.opacity = opacity
-            case let .textPosition(textPosition):
-                self.textPosition = textPosition
-            case let .textAlign(textAlign):
-                self.textAlign = textAlign
-            }
-        }
-    }
-}
-
-extension SECToolbox.IconStyleContent : SECMappable {
-    public func mapping(map: SECMap) {
-        map["color"] = color
-        map["borderColor"] = borderColor
-        map["borderWidth"] = borderWidth
-        map["borderType"] = borderType
-        map["shadowBlur"] = shadowBlur
-        map["shadowColor"] = shadowColor
-        map["shadowOffsetX"] = shadowOffsetX
-        map["shadowOffsetY"] = shadowOffsetY
-        map["opacity"] = opacity
-        map["textPosition"] = textPosition
-        map["textAlign"] = textAlign
-    }
-}
-
-extension SECToolbox.IconStyle : SECEnumable {
-    public enum Enums {
-        case normal(Style), emphasis(Style)
-    }
-    
-    public typealias ContentEnum = Enums
-    
-    public init(_ elements: Enums...) {
-        for ele in elements {
-            switch ele {
-            case let .normal(normal):
-                self.normal = normal
-            case let .emphasis(emphasis):
-                self.emphasis = emphasis
-            }
-        }
-    }
-}
-
-extension SECToolbox.IconStyle : SECMappable {
-    public func mapping(map: SECMap) {
-        map["normal"] = normal
-        map["emphasis"] = emphasis
-    }
-}
-
-// MARK: - SECToolbox.Feature.SaveAsImage
-extension SECToolbox.Feature {
-    /// 保存为图片。
-    public struct SaveAsImage : SECDisplayable {
-        public enum Type : String, SECJsonable {
-            case png = "png"
-            case jpeg = "jpeg"
-            
-            public var jsonString: String {
-                return "\"\(self.rawValue)\""
-            }
-        }
-        
-        /// 保存的图片格式。支持 'png' 和 'jpeg'。
-        public var type: Type?
-        /// 保存的文件名称，默认使用 title.text 作为名称。
-        public var name: String?
-        /// 保存的图片背景色，默认使用 backgroundColor，如果backgroundColor不存在的话会取白色。
-        public var backgroundColor: SECColor?
-        /// 保存为图片时忽略的组件列表，默认忽略工具栏。
-        public var excludeComponents: [String]? // FIXME: 是否需要抽象
-        /// 是否显示该工具。
-        public var show: Bool?
-        ///
-        public var title: String?
-        /// Icon 的 path 字符串，ECharts 3 中支持使用自定义的 svg path 作为 icon，格式参见 SVG PathData。可以从 Adobe Illustrator 等工具编辑导出。
-        public var icon: String? // FIXME: 暂时还不理解
-        /// icon 样式设置。
-        public var iconStyle: SECToolbox.IconStyle?
-        /// 保存图片的分辨率比例，默认跟容器相同大小，如果需要保存更高分辨率的，可以设置为大于 1 的值，例如 2。
-        public var pixelRatio: Float?
-    }
-}
-
-extension SECToolbox.Feature.SaveAsImage : SECEnumable {
-    public enum Enums {
-        case type(Type), name(String), backgroundColor(SECColor), excludeComponents([String]), show(Bool), title(String), icon(String), iconStyle(SECToolbox.IconStyle), pixelRatio(Float)
-    }
-    
-    public typealias ContentEnum = Enums
-    
-    public init(_ elements: Enums...) {
-        for ele in elements {
-            switch ele {
-            case let .type(type):
-                self.type = type
-            case let .name(name):
-                self.name = name
-            case let .backgroundColor(backgroundColor):
-                self.backgroundColor = backgroundColor
-            case let .excludeComponents(excludeComponents):
-                self.excludeComponents = excludeComponents
-            case let .show(show):
-                self.show = show
-            case let .title(title):
-                self.title = title
-            case let .icon(icon):
-                self.icon = icon
-            case let .iconStyle(iconStyle):
-                self.iconStyle = iconStyle
-            case let .pixelRatio(pixelRatio):
-                self.pixelRatio = pixelRatio
-            }
-        }
-    }
-}
-
-extension SECToolbox.Feature.SaveAsImage : SECMappable {
-    public func mapping(map: SECMap) {
-        map["type"] = type
-        map["name"] = name
-        map["backgroundColor"] = backgroundColor
-        map["excludeComponents"] = excludeComponents
-        map["show"] = show
-        map["title"] = title
-        map["icon"] = icon
-        map["iconStyle"] = iconStyle
-        map["pixelRatio"] = pixelRatio
-    }
-}
-
-// MARK: - SECToolbox.Feature.Restore
-extension SECToolbox.Feature {
-    /// 配置项还原。
-    public struct Restore : SECDisplayable {
-        /// 是否显示该工具。
-        public var show: Bool?
-        /// 标题
-        public var title: String?
-        /// Icon 的 path 字符串，ECharts 3 中支持使用自定义的 svg path 作为 icon，格式参见 SVG PathData。可以从 Adobe Illustrator 等工具编辑导出。
-        public var icon: String? // FIXME: 暂时还不理解
-        /// icon 样式设置。
-        public var iconStyle: SECToolbox.IconStyle?
-    }
-}
-
-extension SECToolbox.Feature.Restore : SECEnumable {
-    public enum Enums {
-        case show(Bool), title(String), icon(String), iconStyle(SECToolbox.IconStyle)
-    }
-    
-    public typealias ContentEnum = Enums
-    
-    public init(_ elements: Enums...) {
-        for ele in elements {
-            switch ele {
-            case let .show(show):
-                self.show = show
-            case let .title(title):
-                self.title = title
-            case let .icon(icon):
-                self.icon = icon
-            case let .iconStyle(iconStyle):
-                self.iconStyle = iconStyle
-            }
-        }
-    }
-}
-
-extension SECToolbox.Feature.Restore : SECMappable {
-    public func mapping(map: SECMap) {
-        map["show"] = show
-        map["title"] = title
-        map["icon"] = icon
-        map["iconStyle"] = iconStyle
-    }
-}
-
-// MARK: - SECToolbox.Feature.DataView
-extension SECToolbox.Feature {
-    /// 数据视图工具，可以展现当前图表所用的数据，编辑后可以动态更新。
-    public struct DataView : SECDisplayable {
-        /// 是否显示该工具。
-        public var show: Bool?
-        /// 标题
-        public var title: String?
-        /// Icon 的 path 字符串，ECharts 3 中支持使用自定义的 svg path 作为 icon，格式参见 SVG PathData。可以从 Adobe Illustrator 等工具编辑导出。
-        public var icon: String? // FIXME: 暂时还不理解
-        /// 数据视图 icon 样式设置。
-        public var iconStyle: SECToolbox.IconStyle?
-        /// 是否不可编辑（只读）。
-        public var readOnly: Bool?
-//        public var optionToContent: String? // FIXME: 是否需要封装?
-//        public var contentToOption: String? // FIXME: 是否需要封装?
-        /// 数据视图上有三个话术，默认是['数据视图', '关闭', '刷新']。
-        public var lang: [String]?
-        /// 数据视图浮层背景色。
-        public var backgroundColor: SECColor?
-        /// 数据视图浮层文本输入区背景色。
-        public var textareaColor: SECColor?
-        /// 数据视图浮层文本输入区边框颜色。
-        public var textareaBorderColor: SECColor?
-        /// 文本颜色。
-        public var textColor: SECColor?
-        /// 按钮颜色。
-        public var buttonColor: SECColor?
-        /// 按钮文本颜色。
-        public var buttonTextColor: SECColor?
-    }
-}
-
-extension SECToolbox.Feature.DataView : SECEnumable {
-    public enum Enums {
-        case show(Bool), title(String), icon(String), iconStyle(SECToolbox.IconStyle), readOnly(Bool), lang([String]), backgroundColor(SECColor), textareaColor(SECColor), textareaBorderColor(SECColor), textColor(SECColor), buttonColor(SECColor), buttonTextColor(SECColor)
-    }
-    
-    public typealias ContentEnum = Enums
-    
-    public init(_ elements: Enums...) {
-        for ele in elements {
-            switch ele {
-            case let .show(show):
-                self.show = show
-            case let .title(title):
-                self.title = title
-            case let .icon(icon):
-                self.icon = icon
-            case let .iconStyle(iconStyle):
-                self.iconStyle = iconStyle
-            case let .readOnly(readOnly):
-                self.readOnly = readOnly
-            case let .lang(lang):
-                self.lang = lang
-            case let .backgroundColor(backgroundColor):
-                self.backgroundColor = backgroundColor
-            case let .textareaColor(textareaColor):
-                self.textareaColor = textareaColor
-            case let .textareaBorderColor(textareaBorderColor):
-                self.textareaBorderColor = textareaBorderColor
-            case let .textColor(textColor):
-                self.textColor = textColor
-            case let .buttonColor(buttonColor):
-                self.buttonColor = buttonColor
-            case let .buttonTextColor(buttonTextColor):
-                self.buttonTextColor = buttonTextColor
-            }
-        }
-    }
-}
-
-extension SECToolbox.Feature.DataView : SECMappable {
-    public func mapping(map: SECMap) {
-        map["show"] = show
-        map["title"] = title
-        map["icon"] = icon
-        map["iconStyle"] = iconStyle
-        map["readOnly"] = readOnly
-//        map["optionToContent"] = optionToContent
-//        map["contentToOption"] = contentToOption
-        map["lang"] = lang
-        map["backgroundColor"] = backgroundColor
-        map["textareaColor"] = textareaColor
-        map["textareaBorderColor"] = textareaBorderColor
-        map["textColor"] = textColor
-        map["buttonColor"] = buttonColor
-        map["buttonTextColor"] = buttonTextColor
-    }
-}
-
-// MARK: - SECToolbox.Feature.DataZoom
-extension SECToolbox.Feature {
-    /// 数据区域缩放。目前只支持直角坐标系的缩放。
-    public struct DataZoom : SECDisplayable {
-        
-        /// 指定哪些 Axis 被控制
-        ///
-        /// - bool: 如果设置为 false 则不控制任何x轴
-        /// - int: 如果设置成 3 则控制 axisIndex 为 3 的x轴
-        /// - array: 如果设置为 [0, 3] 则控制 axisIndex 为 0 和 3 的x轴。
-        public enum AxisIndexSelector : SECJsonable {
-            case bool(Bool)
-            case int(UInt)
-            case array([UInt])
-            
-            public var jsonString: String {
-                switch self {
-                case let .bool(b):
-                    if b {
-                        return "\"all\""
-                    } else {
-                        return "\"none\""
-                    }
-                case let .int(i):
-                    return "\(i)"
-                case let .array(arr):
-                    var result = "["
-                    for i in arr {
-                        result = "\(i),"
-                    }
-                    result = result.substringToIndex(result.endIndex.predecessor())
-                    result += "]"
-                    return result
-                }
-            }
-        }
-        
-        /// 缩放和还原的标题文本。
-        public struct Title {
-            /// 缩放标题
-            public var zoom: String?
-            /// 还原标题
-            public var back: String?
-        }
-        
-        /// 缩放和还原的 icon path。
-        public struct Icon {
-            /// 缩放Icon 的 path 字符串，ECharts 3 中支持使用自定义的 svg path 作为 icon，格式参见 SVG PathData。可以从 Adobe Illustrator 等工具编辑导出。
-            public var zoom: String?
-            /// 还原Icon 的 path 字符串，ECharts 3 中支持使用自定义的 svg path 作为 icon，格式参见 SVG PathData。可以从 Adobe Illustrator 等工具编辑导出。
-            public var back: String?
-        }
-        
-        /// 是否显示该工具。
-        public var show: Bool?
-        /// 缩放和还原的标题文本。
-        public var title: Title?
-        /// 缩放和还原的 icon path。
-        public var icon: Icon?
-        /// 数据区域缩放 icon 样式设置。
-        public var iconStyle: SECToolbox.IconStyle?
-        /// 指定哪些 xAxis 被控制。如果缺省则控制所有的x轴。如果设置为 false 则不控制任何x轴。如果设置成 3 则控制 axisIndex 为 3 的x轴。如果设置为 [0, 3] 则控制 axisIndex 为 0 和 3 的x轴。
-        public var xAxisIndex: AxisIndexSelector?
-        /// 指定哪些 yAxis 被控制。如果缺省则控制所有的y轴。如果设置为 false 则不控制任何y轴。如果设置成 3 则控制 axisIndex 为 3 的y轴。如果设置为 [0, 3] 则控制 axisIndex 为 0 和 3 的y轴。
-        public var yAxisIndex: AxisIndexSelector?
-    }
-}
-
-extension SECToolbox.Feature.DataZoom.Title : SECEnumable {
-    public enum Enums {
-        case zoom(String), back(String)
-    }
-    
-    public typealias ContentEnum = Enums
-    
-    public init(_ elements: Enums...) {
-        for ele in elements {
-            switch ele {
-            case let .zoom(zoom):
-                self.zoom = zoom
-            case let .back(back):
-                self.back = back
-            }
-        }
-    }
-}
-
-extension SECToolbox.Feature.DataZoom.Title : SECMappable {
-    public func mapping(map: SECMap) {
-        map["zoom"] = zoom
-        map["back"] = back
-    }
-}
-
-extension SECToolbox.Feature.DataZoom.Icon : SECEnumable {
-    public enum Enums {
-        case zoom(String), back(String)
-    }
-    
-    public typealias ContentEnum = Enums
-    
-    public init(_ elements: Enums...) {
-        for ele in elements {
-            switch ele {
-            case let .zoom(zoom):
-                self.zoom = zoom
-            case let .back(back):
-                self.back = back
-            }
-        }
-    }
-}
-
-extension SECToolbox.Feature.DataZoom.Icon : SECMappable {
-    public func mapping(map: SECMap) {
-        map["zoom"] = zoom
-        map["back"] = back
-    }
-}
-
-extension SECToolbox.Feature.DataZoom : SECEnumable {
-    public enum Enums {
-        case show(Bool), title(Title), icon(Icon), iconStyle(SECToolbox.IconStyle), xAxisIndex(AxisIndexSelector), yAxisIndex(AxisIndexSelector)
-    }
-    
-    public typealias ContentEnum = Enums
-    
-    public init(_ elements: Enums...) {
-        for ele in elements {
-            switch ele {
-            case let .show(show):
-                self.show = show
-            case let .title(title):
-                self.title = title
-            case let .icon(icon):
-                self.icon = icon
-            case let .iconStyle(iconStyle):
-                self.iconStyle = iconStyle
-            case let .xAxisIndex(xAxisIndex):
-                self.xAxisIndex = xAxisIndex
-            case let .yAxisIndex(yAxisIndex):
-                self.yAxisIndex = yAxisIndex
-            }
-        }
-    }
-}
-
-extension SECToolbox.Feature.DataZoom : SECMappable {
-    public func mapping(map: SECMap) {
-        map["show"] = show
-        map["title"] = title
-        map["icon"] = icon
-        map["iconStyle"] = iconStyle
-        map["xAxisIndex"] = xAxisIndex
-        map["yAxisIndex"] = yAxisIndex
-    }
-}
-
-
-// MARK: - SECToolbox.Feature.MagicType
-extension SECToolbox.Feature {
-    /// 动态类型切换 示例：
-    ///
-    ///     feature: {
-    ///         magicType: {
-    ///             type: ['line', 'bar', 'stack', 'tiled']
-    ///         }
-    ///     }
-    public struct MagicType : SECDisplayable {
-        
-        /// 动态类型切换可启用的动态类型
-        ///
-        /// - line: 折线图
-        /// - bar: 柱状图
-        /// - stack: 堆叠模式
-        /// - tiled: 平铺模式
-        public enum Type : String, SECJsonable {
-            case line = "line"
-            case bar = "bar"
-            case stack = "stack"
-            case tiled = "tiled"
-            
-            public var jsonString: String {
-                return "\"\(self.rawValue)\""
-            }
-        }
-        
-        /// 各个类型的标题文本，可以分别配置。
-        public struct Title {
-            public var line: String?
-            public var bar: String?
-            public var stack: String?
-            public var tiled: String?
-        }
-        
-        /// 各个类型的 icon path，可以分别配置。
-        public struct Icon {
-            public var line: String?
-            public var bar: String?
-            public var stack: String?
-            public var tiled: String?
-        }
-        
-        /// 是否显示该工具。
-        public var show: Bool?
-        /// 启用的动态类型，包括'line'（切换为折线图）, 'bar'（切换为柱状图）, 'stack'（切换为堆叠模式）, 'tiled'（切换为平铺模式）。
-        public var type: [Type]?
-        /// 各个类型的标题文本，可以分别配置。
-        public var title: Title?
-        /// 各个类型的 icon path，可以分别配置。
-        public var icon: Icon?
-//        public var option? // 暂不支持
-//        public seriesIndex: // 暂不支持
-    }
-}
-
-extension SECToolbox.Feature.MagicType.Title : SECEnumable {
-    public enum Enums {
-        case line(String), bar(String), stack(String), tiled(String)
-    }
-    
-    public typealias ContentEnum = Enums
-    
-    public init(_ elements: Enums...) {
-        for ele in elements {
-            switch ele {
-            case let .line(line):
-                self.line = line
-            case let .bar(bar):
-                self.bar = bar
-            case let .stack(stack):
-                self.stack = stack
-            case let .tiled(tiled):
-                self.tiled = tiled
-            }
-        }
-    }
-}
-
-extension SECToolbox.Feature.MagicType.Title : SECMappable {
-    public func mapping(map: SECMap) {
-        map["line"] = line
-        map["bar"] = bar
-        map["stack"] = stack
-        map["tiled"] = tiled
-    }
-}
-
-extension SECToolbox.Feature.MagicType.Icon : SECEnumable {
-    public enum Enums {
-        case line(String), bar(String), stack(String), tiled(String)
-    }
-    
-    public typealias ContentEnum = Enums
-    
-    public init(_ elements: Enums...) {
-        for ele in elements {
-            switch ele {
-            case let .line(line):
-                self.line = line
-            case let .bar(bar):
-                self.bar = bar
-            case let .stack(stack):
-                self.stack = stack
-            case let .tiled(tiled):
-                self.tiled = tiled
-            }
-        }
-    }
-}
-
-extension SECToolbox.Feature.MagicType.Icon : SECMappable {
-    public func mapping(map: SECMap) {
-        map["line"] = line
-        map["bar"] = bar
-        map["stack"] = stack
-        map["tiled"] = tiled
-    }
-}
-
-extension SECToolbox.Feature.MagicType : SECEnumable {
-    public enum Enums {
-        case show(Bool), type([Type]), title(Title), icon(Icon)
-    }
-    
-    public typealias ContentEnum = Enums
-    
-    public init(_ elements: Enums...) {
-        for ele in elements {
-            switch ele {
-            case let .show(show):
-                self.show = show
-            case let .type(type):
-                self.type = type
-            case let .title(title):
-                self.title = title
-            case let .icon(icon):
-                self.icon = icon
-            }
-        }
-    }
-}
-
-extension SECToolbox.Feature.MagicType : SECMappable {
-    public func mapping(map: SECMap) {
-        map["show"] = show
-        map["type"] = type
-        map["title"] = title
-        map["icon"] = icon
-//        map["option"] = option
-//        map["seriesIndex"] = seriesIndex
-    }
-}
-
-// MARK: - SECToolbox.Feature.Brush
-extension SECToolbox.Feature {
-    /// 选框组件的控制按钮。
-    ///
-    /// 也可以不在这里指定，而是在 brush.toolbox 中指定。
-    public struct Brush {
-        /// 选框组件的控制按钮类型
-        ///
-        /// - rect: 开启矩形选框选择功能。
-        /// - polygon: 开启任意形状选框选择功能。
-        /// - lineX: 开启横向选择功能。
-        /// - lineY: 开启纵向选择功能。
-        /// - keep: 切换『单选』和『多选』模式。后者可支持同时画多个选框。前者支持单击清除所有选框。
-        /// - clear: 清空所有选框。
-        public enum Type: String, SECJsonable {
-            case rect = "rect"
-            case polygon = "polygon"
-            case lineX = "lineX"
-            case lineY = "lineY"
-            case keep = "keep"
-            case clear = "clear"
-            
-            public var jsonString: String {
-                 return "\"\(self.rawValue)\""
-            }
-        }
-        
-        /// 每个按钮的 icon path。
-        public struct Icon {
-            public var rect: String?
-            public var polygon: String?
-            public var lineX: String?
-            public var lineY: String?
-            public var keep: String?
-            public var clear: String?
-        }
-        
-        /// 标题文本。
-        public struct Title {
-            public var rect: String?
-            public var polygon: String?
-            public var lineX: String?
-            public var lineY: String?
-            public var keep: String?
-            public var clear: String?
-        }
-        
-        public var type: [Type]?
-        public var icon: Icon?
-        public var title: Title?
-    }
-}
-
-extension SECToolbox.Feature.Brush.Icon : SECEnumable {
-    public enum Enums {
-        case rect(String), polygon(String), lineX(String), lineY(String), keep(String), clear(String)
-    }
-    
-    public typealias ContentEnum = Enums
-    
-    public init(_ elements: Enums...) {
-        for ele in elements {
-            switch ele {
-            case let .rect(rect):
-                self.rect = rect
-            case let .polygon(polygon):
-                self.polygon = polygon
-            case let .lineX(lineX):
-                self.lineX = lineX
-            case let .lineY(lineY):
-                self.lineY = lineY
-            case let .keep(keep):
-                self.keep = keep
-            case let .clear(clear):
-                self.clear = clear
-            }
-        }
-    }
-}
-
-extension SECToolbox.Feature.Brush.Icon : SECMappable {
-    public func mapping(map: SECMap) {
-        map["rect"] = rect
-        map["polygon"] = polygon
-        map["lineX"] = lineX
-        map["lineY"] = lineY
-        map["keep"] = keep
-        map["clear"] = clear
-    }
-}
-
-extension SECToolbox.Feature.Brush.Title : SECEnumable {
-    public enum Enums {
-        case rect(String), polygon(String), lineX(String), lineY(String), keep(String), clear(String)
-    }
-    
-    public typealias ContentEnum = Enums
-    
-    public init(_ elements: Enums...) {
-        for ele in elements {
-            switch ele {
-            case let .rect(rect):
-                self.rect = rect
-            case let .polygon(polygon):
-                self.polygon = polygon
-            case let .lineX(lineX):
-                self.lineX = lineX
-            case let .lineY(lineY):
-                self.lineY = lineY
-            case let .keep(keep):
-                self.keep = keep
-            case let .clear(clear):
-                self.clear = clear
-            }
-        }
-    }
-}
-
-extension SECToolbox.Feature.Brush.Title : SECMappable {
-    public func mapping(map: SECMap) {
-        map["rect"] = rect
-        map["polygon"] = polygon
-        map["lineX"] = lineX
-        map["lineY"] = lineY
-        map["keep"] = keep
-        map["clear"] = clear
-    }
-}
-
-extension SECToolbox.Feature.Brush : SECEnumable {
-    public enum Enums {
-        case type([Type]), icon(Icon), title(Title)
-    }
-    
-    public typealias ContentEnum = Enums
-    
-    public init(_ elements: Enums...) {
-        for ele in elements {
-            switch ele {
-            case let .type(type):
-                self.type = type
-            case let .icon(icon):
-                self.icon = icon
-            case let .title(title):
-                self.title = title
-            }
-        }
-    }
-}
-
-extension SECToolbox.Feature.Brush : SECMappable {
-    public func mapping(map: SECMap) {
-        map["type"] = type
-        map["icon"] = icon
-        map["title"] = title
-    }
-}
-
-public typealias SECTFeature = SECToolbox.Feature
-public typealias SECTFDataZoom = SECToolbox.Feature.DataZoom
-public typealias SECTFDataView = SECToolbox.Feature.DataView
-public typealias SECTFMagicType = SECToolbox.Feature.MagicType
-public typealias SECTFRestore = SECToolbox.Feature.Restore
-public typealias SECTFSaveAsImage = SECToolbox.Feature.SaveAsImage
-public typealias SECTFBrush = SECToolbox.Feature.Brush

    }
}

extension SECToolbox : SECEnumable {
    public enum Enums {
        case show(Bool), orient(SECOrient), itemSize(Float), itemGap(Float), showTitle(Bool), feature(Feature), iconStyle(IconStyle), zlevel(Float), z(Float), left(SECPosition), top(SECPosition), right(SECPosition), bottom(SECPosition), width(Float), height(Float)
    }
    
    public typealias ContentEnum = Enums

    public var height: Float?
}

// MARK: - SECToolbox.IconStyle
extension SECToolbox {
    public struct IconStyleContent : SECOpacitable {
        public var color: SECColor?
        public var borderColor: SECColor?
        public var borderWidth: Float?
        public var borderType: SECLineType?
        public var shadowBlur: Float?
        public var shadowColor: SECColor?
        public var shadowOffsetX: Float?
        public var shadowOffsetY: Float?
        public var opacity: Float? {
            didSet {
                validateOpacity()
            }
        }
        /// 文本位置，'left' / 'right' / 'top' / 'bottom'。
        public var textPosition: SECPosition?
        /// 文本对齐方式，'left' / 'right'。
        public var textAlign: SECAlign?
        
        public init() { }
    }
    
    public struct IconStyle : SECEmphasisable {
        public typealias Style = IconStyleContent
        
        public var normal: Style?
        public var emphasis: Style?
        
        public init() { }
    }
}

extension SECToolbox.IconStyleContent : SECEnumable {
    public enum Enums {
        case color(SECColor), borderColor(SECColor), borderWidth(Float), borderType(SECLineType), shadowBlur(Float), shadowColor(SECColor), shadowOffsetX(Float), shadowOffsetY(Float), opacity(Float), textPosition(SECPosition), textAlign(SECAlign)
    }
    
    public typealias ContentEnum = Enums
    
    public init(_ elements: Enums...) {
        for ele in elements {
            switch ele {
            case let .color(color):
                self.color = color
            case let .borderColor(color):
                self.borderColor = color
            case let .borderWidth(width):
                self.borderWidth = width
            case let .borderType(borderType):
                self.borderType = borderType
            case let .shadowBlur(blur):
                self.shadowBlur = blur
            case let .shadowColor(color):
                self.shadowColor = color
            case let .shadowOffsetX(x):
                self.shadowOffsetX = x
            case let .shadowOffsetY(y):
                self.shadowOffsetY = y
            case let .opacity(opacity):
                self.opacity = opacity
            case let .textPosition(textPosition):
                self.textPosition = textPosition
            case let .textAlign(textAlign):
                self.textAlign = textAlign
            }
        }
    }
}

extension SECToolbox.IconStyleContent : SECMappable {
    public func mapping(map: SECMap) {
        map["color"] = color
        map["borderColor"] = borderColor
        map["borderWidth"] = borderWidth
        map["borderType"] = borderType
        map["shadowBlur"] = shadowBlur
        map["shadowColor"] = shadowColor
        map["shadowOffsetX"] = shadowOffsetX
        map["shadowOffsetY"] = shadowOffsetY
        map["opacity"] = opacity
        map["textPosition"] = textPosition
        map["textAlign"] = textAlign
    }
}

extension SECToolbox.IconStyle : SECEnumable {
    public enum Enums {
        case normal(Style), emphasis(Style)
    }
    
    public typealias ContentEnum = Enums
    
    public init(_ elements: Enums...) {
        for ele in elements {
            switch ele {
            case let .normal(normal):
                self.normal = normal
            case let .emphasis(emphasis):
                self.emphasis = emphasis
            }
        }
    }
}

extension SECToolbox.IconStyle : SECMappable {
    public func mapping(map: SECMap) {
        map["normal"] = normal
        map["emphasis"] = emphasis
    }
}

// MARK: - SECToolbox.Feature.SaveAsImage
extension SECToolbox.Feature {
    /// 保存为图片。
    public struct SaveAsImage : SECDisplayable {
        public enum Type : String, SECJsonable {
            case png = "png"
            case jpeg = "jpeg"
            
            public var jsonString: String {
                return "\"\(self.rawValue)\""
            }
        }
        
        /// 保存的图片格式。支持 'png' 和 'jpeg'。
        public var type: Type?
        /// 保存的文件名称，默认使用 title.text 作为名称。
        public var name: String?
        /// 保存的图片背景色，默认使用 backgroundColor，如果backgroundColor不存在的话会取白色。
        public var backgroundColor: SECColor?
        /// 保存为图片时忽略的组件列表，默认忽略工具栏。
        public var excludeComponents: [String]? // FIXME: 是否需要抽象
        /// 是否显示该工具。
        public var show: Bool?
        ///
        public var title: String?
        /// Icon 的 path 字符串，ECharts 3 中支持使用自定义的 svg path 作为 icon，格式参见 SVG PathData。可以从 Adobe Illustrator 等工具编辑导出。
        public var icon: String? // FIXME: 暂时还不理解
        /// icon 样式设置。
        public var iconStyle: SECToolbox.IconStyle?
        /// 保存图片的分辨率比例，默认跟容器相同大小，如果需要保存更高分辨率的，可以设置为大于 1 的值，例如 2。
        public var pixelRatio: Float?
    }
}

extension SECToolbox.Feature.SaveAsImage : SECEnumable {
    public enum Enums {
        case type(Type), name(String), backgroundColor(SECColor), excludeComponents([String]), show(Bool), title(String), icon(String), iconStyle(SECToolbox.IconStyle), pixelRatio(Float)
    }
    
    public typealias ContentEnum = Enums
    
    public init(_ elements: Enums...) {
        for ele in elements {
            switch ele {
            case let .type(type):
                self.type = type
            case let .name(name):
                self.name = name
            case let .backgroundColor(backgroundColor):
                self.backgroundColor = backgroundColor
            case let .excludeComponents(excludeComponents):
                self.excludeComponents = excludeComponents
            case let .show(show):
                self.show = show
            case let .title(title):
                self.title = title
            case let .icon(icon):
                self.icon = icon
            case let .iconStyle(iconStyle):
                self.iconStyle = iconStyle
            case let .pixelRatio(pixelRatio):
                self.pixelRatio = pixelRatio
            }
        }
    }
}

extension SECToolbox.Feature.SaveAsImage : SECMappable {
    public func mapping(map: SECMap) {
        map["type"] = type
        map["name"] = name
        map["backgroundColor"] = backgroundColor
        map["excludeComponents"] = excludeComponents
        map["show"] = show
        map["title"] = title
        map["icon"] = icon
        map["iconStyle"] = iconStyle
        map["pixelRatio"] = pixelRatio
    }
}

// MARK: - SECToolbox.Feature.Restore
extension SECToolbox.Feature {
    /// 配置项还原。
    public struct Restore : SECDisplayable {
        /// 是否显示该工具。
        public var show: Bool?
        /// 标题
        public var title: String?
        /// Icon 的 path 字符串，ECharts 3 中支持使用自定义的 svg path 作为 icon，格式参见 SVG PathData。可以从 Adobe Illustrator 等工具编辑导出。
        public var icon: String? // FIXME: 暂时还不理解
        /// icon 样式设置。
        public var iconStyle: SECToolbox.IconStyle?
    }
}

extension SECToolbox.Feature.Restore : SECEnumable {
    public enum Enums {
        case show(Bool), title(String), icon(String), iconStyle(SECToolbox.IconStyle)
    }
    
    public typealias ContentEnum = Enums
    
    public init(_ elements: Enums...) {
        for ele in elements {
            switch ele {
            case let .show(show):
                self.show = show
            case let .title(title):
                self.title = title
            case let .icon(icon):
                self.icon = icon
            case let .iconStyle(iconStyle):
                self.iconStyle = iconStyle
            }
        }
    }
}

extension SECToolbox.Feature.Restore : SECMappable {
    public func mapping(map: SECMap) {
        map["show"] = show
        map["title"] = title
        map["icon"] = icon
        map["iconStyle"] = iconStyle
    }
}

// MARK: - SECToolbox.Feature.DataView
extension SECToolbox.Feature {
    /// 数据视图工具，可以展现当前图表所用的数据，编辑后可以动态更新。
    public struct DataView : SECDisplayable {
        /// 是否显示该工具。
        public var show: Bool?
        /// 标题
        public var title: String?
        /// Icon 的 path 字符串，ECharts 3 中支持使用自定义的 svg path 作为 icon，格式参见 SVG PathData。可以从 Adobe Illustrator 等工具编辑导出。
        public var icon: String? // FIXME: 暂时还不理解
        /// 数据视图 icon 样式设置。
        public var iconStyle: SECToolbox.IconStyle?
        /// 是否不可编辑（只读）。
        public var readOnly: Bool?
//        public var optionToContent: String? // FIXME: 是否需要封装?
//        public var contentToOption: String? // FIXME: 是否需要封装?
        /// 数据视图上有三个话术，默认是['数据视图', '关闭', '刷新']。
        public var lang: [String]?
        /// 数据视图浮层背景色。
        public var backgroundColor: SECColor?
        /// 数据视图浮层文本输入区背景色。
        public var textareaColor: SECColor?
        /// 数据视图浮层文本输入区边框颜色。
        public var textareaBorderColor: SECColor?
        /// 文本颜色。
        public var textColor: SECColor?
        /// 按钮颜色。
        public var buttonColor: SECColor?
        /// 按钮文本颜色。
        public var buttonTextColor: SECColor?
    }
}

extension SECToolbox.Feature.DataView : SECEnumable {
    public enum Enums {
        case show(Bool), title(String), icon(String), iconStyle(SECToolbox.IconStyle), readOnly(Bool), lang([String]), backgroundColor(SECColor), textareaColor(SECColor), textareaBorderColor(SECColor), textColor(SECColor), buttonColor(SECColor), buttonTextColor(SECColor)
    }
    
    public typealias ContentEnum = Enums
    
    public init(_ elements: Enums...) {
        for ele in elements {
            switch ele {
            case let .show(show):
                self.show = show
            case let .title(title):
                self.title = title
            case let .icon(icon):
                self.icon = icon
            case let .iconStyle(iconStyle):
                self.iconStyle = iconStyle
            case let .readOnly(readOnly):
                self.readOnly = readOnly
            case let .lang(lang):
                self.lang = lang
            case let .backgroundColor(backgroundColor):
                self.backgroundColor = backgroundColor
            case let .textareaColor(textareaColor):
                self.textareaColor = textareaColor
            case let .textareaBorderColor(textareaBorderColor):
                self.textareaBorderColor = textareaBorderColor
            case let .textColor(textColor):
                self.textColor = textColor
            case let .buttonColor(buttonColor):
                self.buttonColor = buttonColor
            case let .buttonTextColor(buttonTextColor):
                self.buttonTextColor = buttonTextColor
            }
        }
    }
}

extension SECToolbox.Feature.DataView : SECMappable {
    public func mapping(map: SECMap) {
        map["show"] = show
        map["title"] = title
        map["icon"] = icon
        map["iconStyle"] = iconStyle
        map["readOnly"] = readOnly
//        map["optionToContent"] = optionToContent
//        map["contentToOption"] = contentToOption
        map["lang"] = lang
        map["backgroundColor"] = backgroundColor
        map["textareaColor"] = textareaColor
        map["textareaBorderColor"] = textareaBorderColor
        map["textColor"] = textColor
        map["buttonColor"] = buttonColor
        map["buttonTextColor"] = buttonTextColor
    }
}

// MARK: - SECToolbox.Feature.DataZoom
extension SECToolbox.Feature {
    /// 数据区域缩放。目前只支持直角坐标系的缩放。
    public struct DataZoom : SECDisplayable {
        
        /// 指定哪些 Axis 被控制
        ///
        /// - bool: 如果设置为 false 则不控制任何x轴
        /// - int: 如果设置成 3 则控制 axisIndex 为 3 的x轴
        /// - array: 如果设置为 [0, 3] 则控制 axisIndex 为 0 和 3 的x轴。
        public enum AxisIndexSelector : SECJsonable {
            case bool(Bool)
            case int(UInt)
            case array([UInt])
            
            public var jsonString: String {
                switch self {
                case let .bool(b):
                    if b {
                        return "\"all\""
                    } else {
                        return "\"none\""
                    }
                case let .int(i):
                    return "\(i)"
                case let .array(arr):
                    var result = "["
                    for i in arr {
                        result = "\(i),"
                    }
                    result = result.substringToIndex(result.endIndex.predecessor())
                    result += "]"
                    return result
                }
            }
        }
        
        /// 缩放和还原的标题文本。
        public struct Title {
            /// 缩放标题
            public var zoom: String?
            /// 还原标题
            public var back: String?
        }
        
        /// 缩放和还原的 icon path。
        public struct Icon {
            /// 缩放Icon 的 path 字符串，ECharts 3 中支持使用自定义的 svg path 作为 icon，格式参见 SVG PathData。可以从 Adobe Illustrator 等工具编辑导出。
            public var zoom: String?
            /// 还原Icon 的 path 字符串，ECharts 3 中支持使用自定义的 svg path 作为 icon，格式参见 SVG PathData。可以从 Adobe Illustrator 等工具编辑导出。
            public var back: String?
        }
        
        /// 是否显示该工具。
        public var show: Bool?
        /// 缩放和还原的标题文本。
        public var title: Title?
        /// 缩放和还原的 icon path。
        public var icon: Icon?
        /// 数据区域缩放 icon 样式设置。
        public var iconStyle: SECToolbox.IconStyle?
        /// 指定哪些 xAxis 被控制。如果缺省则控制所有的x轴。如果设置为 false 则不控制任何x轴。如果设置成 3 则控制 axisIndex 为 3 的x轴。如果设置为 [0, 3] 则控制 axisIndex 为 0 和 3 的x轴。
        public var xAxisIndex: AxisIndexSelector?
        /// 指定哪些 yAxis 被控制。如果缺省则控制所有的y轴。如果设置为 false 则不控制任何y轴。如果设置成 3 则控制 axisIndex 为 3 的y轴。如果设置为 [0, 3] 则控制 axisIndex 为 0 和 3 的y轴。
        public var yAxisIndex: AxisIndexSelector?
    }
}

extension SECToolbox.Feature.DataZoom.Title : SECEnumable {
    public enum Enums {
        case zoom(String), back(String)
    }
    
    public typealias ContentEnum = Enums
    
    public init(_ elements: Enums...) {
        for ele in elements {
            switch ele {
            case let .zoom(zoom):
                self.zoom = zoom
            case let .back(back):
                self.back = back
            }
        }
    }
}

extension SECToolbox.Feature.DataZoom.Title : SECMappable {
    public func mapping(map: SECMap) {
        map["zoom"] = zoom
        map["back"] = back
    }
}

extension SECToolbox.Feature.DataZoom.Icon : SECEnumable {
    public enum Enums {
        case zoom(String), back(String)
    }
    
    public typealias ContentEnum = Enums
    
    public init(_ elements: Enums...) {
        for ele in elements {
            switch ele {
            case let .zoom(zoom):
                self.zoom = zoom
            case let .back(back):
                self.back = back
            }
        }
    }
}

extension SECToolbox.Feature.DataZoom.Icon : SECMappable {
    public func mapping(map: SECMap) {
        map["zoom"] = zoom
        map["back"] = back
    }
}

extension SECToolbox.Feature.DataZoom : SECEnumable {
    public enum Enums {
        case show(Bool), title(Title), icon(Icon), iconStyle(SECToolbox.IconStyle), xAxisIndex(AxisIndexSelector), yAxisIndex(AxisIndexSelector)
    }
    
    public typealias ContentEnum = Enums
    
    public init(_ elements: Enums...) {
        for ele in elements {
            switch ele {
            case let .show(show):
                self.show = show
            case let .title(title):
                self.title = title
            case let .icon(icon):
                self.icon = icon
            case let .iconStyle(iconStyle):
                self.iconStyle = iconStyle
            case let .xAxisIndex(xAxisIndex):
                self.xAxisIndex = xAxisIndex
            case let .yAxisIndex(yAxisIndex):
                self.yAxisIndex = yAxisIndex
            }
        }
    }
}

extension SECToolbox.Feature.DataZoom : SECMappable {
    public func mapping(map: SECMap) {
        map["show"] = show
        map["title"] = title
        map["icon"] = icon
        map["iconStyle"] = iconStyle
        map["xAxisIndex"] = xAxisIndex
        map["yAxisIndex"] = yAxisIndex
    }
}


// MARK: - SECToolbox.Feature.MagicType
extension SECToolbox.Feature {
    /// 动态类型切换 示例：
    ///
    ///     feature: {
    ///         magicType: {
    ///             type: ['line', 'bar', 'stack', 'tiled']
    ///         }
    ///     }
    public struct MagicType : SECDisplayable {
        
        /// 动态类型切换可启用的动态类型
        ///
        /// - line: 折线图
        /// - bar: 柱状图
        /// - stack: 堆叠模式
        /// - tiled: 平铺模式
        public enum Type : String, SECJsonable {
            case line = "line"
            case bar = "bar"
            case stack = "stack"
            case tiled = "tiled"
            
            public var jsonString: String {
                return "\"\(self.rawValue)\""
            }
        }
        
        /// 各个类型的标题文本，可以分别配置。
        public struct Title {
            public var line: String?
            public var bar: String?
            public var stack: String?
            public var tiled: String?
        }
        
        /// 各个类型的 icon path，可以分别配置。
        public struct Icon {
            public var line: String?
            public var bar: String?
            public var stack: String?
            public var tiled: String?
        }
        
        /// 是否显示该工具。
        public var show: Bool?
        /// 启用的动态类型，包括'line'（切换为折线图）, 'bar'（切换为柱状图）, 'stack'（切换为堆叠模式）, 'tiled'（切换为平铺模式）。
        public var type: [Type]?
        /// 各个类型的标题文本，可以分别配置。
        public var title: Title?
        /// 各个类型的 icon path，可以分别配置。
        public var icon: Icon?
//        public var option? // 暂不支持
//        public seriesIndex: // 暂不支持
    }
}

extension SECToolbox.Feature.MagicType.Title : SECEnumable {
    public enum Enums {
        case line(String), bar(String), stack(String), tiled(String)
    }
    
    public typealias ContentEnum = Enums
    
    public init(_ elements: Enums...) {
        for ele in elements {
            switch ele {
            case let .line(line):
                self.line = line
            case let .bar(bar):
                self.bar = bar
            case let .stack(stack):
                self.stack = stack
            case let .tiled(tiled):
                self.tiled = tiled
            }
        }
    }
}

extension SECToolbox.Feature.MagicType.Title : SECMappable {
    public func mapping(map: SECMap) {
        map["line"] = line
        map["bar"] = bar
        map["stack"] = stack
        map["tiled"] = tiled
    }
}

extension SECToolbox.Feature.MagicType.Icon : SECEnumable {
    public enum Enums {
        case line(String), bar(String), stack(String), tiled(String)
    }
    
    public typealias ContentEnum = Enums
    
    public init(_ elements: Enums...) {
        for ele in elements {
            switch ele {
            case let .line(line):
                self.line = line
            case let .bar(bar):
                self.bar = bar
            case let .stack(stack):
                self.stack = stack
            case let .tiled(tiled):
                self.tiled = tiled
            }
        }
    }
}

extension SECToolbox.Feature.MagicType.Icon : SECMappable {
    public func mapping(map: SECMap) {
        map["line"] = line
        map["bar"] = bar
        map["stack"] = stack
        map["tiled"] = tiled
    }
}

extension SECToolbox.Feature.MagicType : SECEnumable {
    public enum Enums {
        case show(Bool), type([Type]), title(Title), icon(Icon)
    }
    
    public typealias ContentEnum = Enums
    
    public init(_ elements: Enums...) {
        for ele in elements {
            switch ele {
            case let .show(show):
                self.show = show
            case let .type(type):
                self.type = type
            case let .title(title):
                self.title = title
            case let .icon(icon):
                self.icon = icon
            }
        }
    }
}

extension SECToolbox.Feature.MagicType : SECMappable {
    public func mapping(map: SECMap) {
        map["show"] = show
        map["type"] = type
        map["title"] = title
        map["icon"] = icon
//        map["option"] = option
//        map["seriesIndex"] = seriesIndex
    }
}

// MARK: - SECToolbox.Feature.Brush
extension SECToolbox.Feature {
    /// 选框组件的控制按钮。
    ///
    /// 也可以不在这里指定，而是在 brush.toolbox 中指定。
    public struct Brush {
        /// 选框组件的控制按钮类型
        ///
        /// - rect: 开启矩形选框选择功能。
        /// - polygon: 开启任意形状选框选择功能。
        /// - lineX: 开启横向选择功能。
        /// - lineY: 开启纵向选择功能。
        /// - keep: 切换『单选』和『多选』模式。后者可支持同时画多个选框。前者支持单击清除所有选框。
        /// - clear: 清空所有选框。
        public enum Type: String, SECJsonable {
            case rect = "rect"
            case polygon = "polygon"
            case lineX = "lineX"
            case lineY = "lineY"
            case keep = "keep"
            case clear = "clear"
            
            public var jsonString: String {
                 return "\"\(self.rawValue)\""
            }
        }
        
        /// 每个按钮的 icon path。
        public struct Icon {
            public var rect: String?
            public var polygon: String?
            public var lineX: String?
            public var lineY: String?
            public var keep: String?
            public var clear: String?
        }
        
        /// 标题文本。
        public struct Title {
            public var rect: String?
            public var polygon: String?
            public var lineX: String?
            public var lineY: String?
            public var keep: String?
            public var clear: String?
        }
        
        public var type: [Type]?
        public var icon: Icon?
        public var title: Title?
    }
}

extension SECToolbox.Feature.Brush.Icon : SECEnumable {
    public enum Enums {
        case rect(String), polygon(String), lineX(String), lineY(String), keep(String), clear(String)
    }
    
    public typealias ContentEnum = Enums
    
    public init(_ elements: Enums...) {
        for ele in elements {
            switch ele {
            case let .rect(rect):
                self.rect = rect
            case let .polygon(polygon):
                self.polygon = polygon
            case let .lineX(lineX):
                self.lineX = lineX
            case let .lineY(lineY):
                self.lineY = lineY
            case let .keep(keep):
                self.keep = keep
            case let .clear(clear):
                self.clear = clear
            }
        }
    }
}

extension SECToolbox.Feature.Brush.Icon : SECMappable {
    public func mapping(map: SECMap) {
        map["rect"] = rect
        map["polygon"] = polygon
        map["lineX"] = lineX
        map["lineY"] = lineY
        map["keep"] = keep
        map["clear"] = clear
    }
}

extension SECToolbox.Feature.Brush.Title : SECEnumable {
    public enum Enums {
        case rect(String), polygon(String), lineX(String), lineY(String), keep(String), clear(String)
    }
    
    public typealias ContentEnum = Enums
    
    public init(_ elements: Enums...) {
        for ele in elements {
            switch ele {
            case let .rect(rect):
                self.rect = rect
            case let .polygon(polygon):
                self.polygon = polygon
            case let .lineX(lineX):
                self.lineX = lineX
            case let .lineY(lineY):
                self.lineY = lineY
            case let .keep(keep):
                self.keep = keep
            case let .clear(clear):
                self.clear = clear
            }
        }
    }
}

extension SECToolbox.Feature.Brush.Title : SECMappable {
    public func mapping(map: SECMap) {
        map["rect"] = rect
        map["polygon"] = polygon
        map["lineX"] = lineX
        map["lineY"] = lineY
        map["keep"] = keep
        map["clear"] = clear
    }
}

extension SECToolbox.Feature.Brush : SECEnumable {
    public enum Enums {
        case type([Type]), icon(Icon), title(Title)
    }
    
    public typealias ContentEnum = Enums
    
    public init(_ elements: Enums...) {
        for ele in elements {
            switch ele {
            case let .type(type):
                self.type = type
            case let .icon(icon):
                self.icon = icon
            case let .title(title):
                self.title = title
            }
        }
    }
}

extension SECToolbox.Feature.Brush : SECMappable {
    public func mapping(map: SECMap) {
        map["type"] = type
        map["icon"] = icon
        map["title"] = title
    }
}

public typealias SECTFeature = SECToolbox.Feature
public typealias SECTFDataZoom = SECToolbox.Feature.DataZoom
public typealias SECTFDataView = SECToolbox.Feature.DataView
public typealias SECTFMagicType = SECToolbox.Feature.MagicType
public typealias SECTFRestore = SECToolbox.Feature.Restore
public typealias SECTFSaveAsImage = SECToolbox.Feature.SaveAsImage
public typealias SECTFBrush = SECToolbox.Feature.Brush


extension SECToolbox.Feature : SECEnumable {
    public enum Enums {
        case saveAsImage(SECTFSaveAsImage), restore(SECTFRestore), dataView(SECTFDataView), dataZoom(SECTFDataZoom), magicType(SECTFMagicType), brush(SECTFBrush)
    }
    
    public typealias ContentEnum = Enums
