leojpod / elm-apex-charts-link / 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

bar : Bar

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, Basics.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

isHorizontal : Bar -> Bar

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

isStacked : Bar -> Bar

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