kkpoon/elm-echarts/4.0.1

NOTE: this package is not compatible with Elm 0.19.1

ECharts

This is a EChart chart option types collection and a helper to use EChart WebComponent.

Converter

toJsonString : ChartType -> String

convert the chart option to a string of json, which could apply to the [echart-webcomponent] (https://github.com/kkpoon/echarts-webcomponent) option attribute

Chart Types

= PieChart PieChartOption

the chart type

Chart Options

type alias PieChartOption =
{ title :
Maybe
{ show : Bool
, text : String
, subtext : String
, left : String
}
, tooltip :
Maybe
{ show : Bool
, formatter : String
}
, legend :
Maybe
{ 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