leojpod/elm-apex-charts-link/2.2.0

NOTE: the latest version is 3.0.0

Charts.Bar

Use this module to build histograms with discrete scales or bar diagrams.

Building a chart

type Bar

This is an internal type to make sure we're keeping the definitions and list handling coherent and free from outside manipulation

Start

This is the entry point to create a bar chart.

It creates an empty chart which you can use as basis, adding series to it, tuning axis and such...

Adding data

addSeries : String -> List ( String, Float ) -> Bar -> Bar

use this function to add series to your bar chart.

NOTE: it won't work well if your series have different length! (in a later release we might want to do something about that)

Customizations

by default, bar charts are vertical but it is nice to get them horizontal sometimes

by default, bar charts are not stacked but you can fix this easily

Internals

chartData : Bar -> BarChartData

internal method to grab the internal plot reprensentation

this is use to transform the underlying reprensentation to an Apex chart definition