kkpoon/elm-echarts/6.1.0

NOTE: this package is not compatible with Elm 0.19.1

ECharts.PieChart

Pie Chart Options

This module helps to create Pie Chart Option.

ECharts official examples

Definitions

type alias PieChartOption =
{ title : Maybe TitleOption
, tooltip : Maybe TooltipOption
, legend : Maybe LegendOption
, series : Maybe (List PieSeriesOption)
}

describe the chart option of pie chart

defaultPieChartOption : PieChartOption

create a pie chart option of for default value

This function creates an All-Nothing TitleOption. ECharts applies the default value when the option attribute is not specified.

type alias PieSeriesOption =
{ name : Maybe String
, legendHoverLink : Maybe Bool
, hoverAnimation : Maybe Bool
, selectedMode : Maybe SelectedMode
, selectedOffset : Maybe Int
, clockwise : Maybe Bool
, startAngle : Maybe Float
, minAngle : Maybe Float
, roseType : Maybe Bool
, avoidLabelOverlap : Maybe Bool
, stillShowZeroSum : Maybe Bool
, radius : Maybe ( String, String )
, center : Maybe ( String, String )
, itemStyle :
Maybe
{ emphasis :
Maybe
{ shadowBlur : Maybe Int
, shadowOffsetX : Maybe Int
, shadowColor : Maybe String
}
}
, data :
Maybe
(List
{ value : Float
, name : String
}
)
}

describe the data series of pie chart

defaultPieSeriesOption : PieSeriesOption

create a pie chart series option of for default value

This function creates an All-Nothing TitleOption. ECharts applies the default value when the option attribute is not specified.

Encoders

encodePieChartOption : PieChartOption -> Value

encode the pie chart option to Json.Encode.Value