peterszerzo / line-charts / LineChart.Grid


type alias Config =
Internal.Grid.Config

Use in the LineChart.Config passed to LineChart.viewCustom.

chartConfig : LineChart.Config Data msg
chartConfig =
  { ...
  , grid = Grid.default
  , ...
  }

default : Config

Gets you some vague gray grid lines.

dots : Basics.Float -> Color -> Config

Gets you a grid dots of a given radius and color.

lines : Basics.Float -> Color -> Config

Gets you grid lines of a given width and color.

How do I change where the grid lines/dots are placed?

By default there is a grid by every tick. If you want to change the position of the grid or remove it all together, alter your tick configuration of your axis.

The path to the tick in the configuration does through the x or y property for vertical and horizontal grids respectivily and then in the axis property.

See LineChart.Axis -> LineChart.Axis.Ticks -> LineChart.Axis.Tick.