leojpod/elm-apex-charts-link/2.1.0

NOTE: the latest version is 3.0.0

Charts.RoundChart

Use this module to create pie charts, radial charts (and all kind of roundly shaped charts). These charts generally work with either 1 single value or a single series of values

Building a chart

The opaque type representing RoundCharts

Start

pieChart : String -> List ( String, Float ) -> RoundChart

Creates a pie chart with the given title and series

radialBar : String -> List ( String, Float ) -> RoundChart

Create a radial bar chart with the given title and series

Note for a simple "gauge"-type chart, simply give a single-item list as series.

Customizations

this allows to replace the usual "full circle"/360 degree representation by one of custom angles

NOTE: angles are in degrees and 0 represent the top of the page (i.e. noon on an analog watch)

More to come!

Internals

chartData : RoundChart -> RoundChartData

Internal accessor to the round chart definition

this is used to translate from RoundChart to ApexChart

= Pie
| Radial

Internal representation of the chart type

type alias RoundChartOptions =
{ type_ : RoundChartType
, angles :
Maybe
{ from : Int
, to : Int
}
}

Internal type used to describe general options for the round charts