kkpoon/elm-echarts/2.0.0

NOTE: this package is not compatible with Elm 0.19.1

ECharts

Converter

toJsonString : ChartType -> String

convert the chart option to a string of json

Chart Types

= PieChart PieChartOption

the chart type

Chart Options

type alias PieChartOption =
{ title :
{ show : Bool
, text : String
, subtext : String
, left : String
}
, tooltip :
{ show : Bool
, formatter : String
}
, legend :
{ show : Bool
, orient : Orientation
, left : String
, data : List String
}
, series : List PieSeries
}

describe the chart option of pie chart

Series

type alias PieSeries =
{ name : String
, radius : ( String, String )
, center : ( String, String )
, data :
List
{ value : Float
, name : String
}
, itemStyle :
{ emphasis :
{ shadowBlur : Int
, shadowOffsetX : Int
, shadowColor : String
}
}
}

describe the data series of pie chart

Option Attribute Types

= Horizontal
| Vertical

describe the orientation attribute