 //  Copyright © 2017 com.pluto-y. All rights reserved.
 //
 
-import UIKit
-
-public final class CustomSerie: Serie {
+public final class CustomSerie: Serie, Zable, Animatable {
     
     public var type: SerieType {
         return .custom

    public var coordinateSystem: CoordinateSystem?
    public var xAxisIndex: UInt?
    public var yAxisIndex: UInt?
    public var cursor: String?
    public var draggable: Bool?
    public var progressive: Bool?
    public var width: LengthValue?
    public var height: LengthValue?
    public var children: [Jsonable]?
    public var onclick: String?
    public var onmouseover: String?
    public var onmouseout: String?
    public var onmousemove: String?
    public var onmousewheel: String?
    public var onmousedown: String?
    public var onmouseup: String?
    public var ondrag: String?
    public var ondragstart: String?
    public var ondragend: String?
    public var ondragenter: String?
    public var ondragleave: String?
    public var ondragover: String?
    public var ondrop: String?
}

extension CustomSerie: Enumable {
    public enum Enums {
        case name(String), legendHoverLink(Bool), coordinateSystem(CoordinateSystem), xAxisIndex(UInt), yAxisIndex(UInt), cursor(String), draggable(Bool), progressive(Bool), width(LengthValue), height(LengthValue), children([Jsonable]), onclick(String), onmouseover(String), onmouseout(String), onmousemove(String), onmousewheel(String), onmousedown(String), onmouseup(String), ondrag(String), ondragstart(String), ondragend(String), ondragenter(String), ondragleave(String), ondragover(String), ondrop(String)
    }
    
    public typealias ContentEnum = Enums

                self.xAxisIndex = xAxisIndex
            case let .yAxisIndex(yAxisIndex):
                self.yAxisIndex = yAxisIndex
            case let .polarIndex(polarIndex):
                self.polarIndex = polarIndex
            case let .geoIndex(geoIndex):
                self.geoIndex = geoIndex
            case let .calendarIndex(calendarIndex):
                self.calendarIndex = calendarIndex
            case let .renderItem(renderItem):
                self.renderItem = renderItem
            case let .itemStyle(itemStyle):
                self.itemStyle = itemStyle
            case let .dimensions(dimensions):
                self.dimensions = dimensions
            case let .encode(encode):
                self.encode = encode
            case let .data(data):
                self.data = data
            case let .zlevel(zlevel):
                self.zlevel = zlevel
            case let .z(z):
                self.z = z
            case let .silent(silent):
                self.silent = silent
            case let .animation(animation):
                self.animation = animation
            case let .animationThreshold(animationThreshold):
                self.animationThreshold = animationThreshold
            case let .animationDuration(animationDuration):
                self.animationDuration = animationDuration
            case let .animationEasing(animationEasing):
                self.animationEasing = animationEasing
            case let .animationDelay(animationDelay):
                self.animationDelay = animationDelay
            case let .animationDurationUpdate(animationDurationUpdate):
                self.animationDurationUpdate = animationDurationUpdate
            case let .animationEasingUpdate(animationEasingUpdate):
                self.animationEasingUpdate = animationEasingUpdate
            case let .animationDelayUpdate(animationDelayUpdate):
                self.animationDelayUpdate = animationDelayUpdate
            case let .tooltip(tooltip):
                self.tooltip = tooltip
            }
        }
    }
