Package

purescript-apexcharts

Repository
timdeputter/purescript-apexcharts
License
MIT
Uploaded by
timdeputter
Published on
2020-05-19

Purescript bindings for apexcharts.js - "A modern JavaScript charting library to build interactive charts and visualizations with simple API" (https://apexcharts.com)

State

Basically all options should work. Only some options that take functions (events, formatters) are missing. PRS welcome!

Download and Installation

Install apexcharts first (https://apexcharts.com/docs/installation/).

npm install apexcharts --save
bower install --save purescript-apexcharts

Basic example

The basic example from the apexcharts.js readme:

var options = {
  chart: {
    type: 'bar'
  },
  series: [
    {
      name: 'sales',
      data: [30, 40, 35, 50, 49, 60, 70, 91, 125]
    }
  ],
  xaxis: {
    categories: [1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999]
  }
}

var chart = new ApexCharts(document.querySelector('#chart'), options)
chart.render()

The equivalent in purescript:

let chart = (
        chart := (type' := Bar) 
        <> series := [
          name := "sales"
          <> data' := [30,40,35,50,49,60,70,91,125]
        ]
        <> xaxis := (
          categories := [1991,1992,1993,1994,1995,1996,1997,1998,1999]
        )
    )
in render $ createChart "#chart" chart

More Examples here.

Documentation

Module documentation is published on Pursuit.

License

Check LICENSE file for more information.

Modules
Apexcharts
Apexcharts.Annotations
Apexcharts.Annotations.Images
Apexcharts.Annotations.Points
Apexcharts.Annotations.Points.Image
Apexcharts.Annotations.Points.Label
Apexcharts.Annotations.Points.Label.Style
Apexcharts.Annotations.Points.Label.Style.Padding
Apexcharts.Annotations.Points.Marker
Apexcharts.Annotations.Shapes
Apexcharts.Annotations.Texts
Apexcharts.Annotations.Xaxis
Apexcharts.Annotations.Xaxis.Label
Apexcharts.Annotations.Xaxis.Label.Style
Apexcharts.Annotations.Yaxis
Apexcharts.Annotations.Yaxis.Label
Apexcharts.Annotations.Yaxis.Label.Style
Apexcharts.Annotations.Yaxis.Label.Style.Padding
Apexcharts.Chart
Apexcharts.Chart.Animations
Apexcharts.Chart.Animations.AnimateGradually
Apexcharts.Chart.Animations.DynamicAnimation
Apexcharts.Chart.Brush
Apexcharts.Chart.DropShadow
Apexcharts.Chart.Locales
Apexcharts.Chart.Locales.Options
Apexcharts.Chart.Locales.Options.Toolbar
Apexcharts.Chart.Selection
Apexcharts.Chart.Selection.Fill
Apexcharts.Chart.Selection.Stroke
Apexcharts.Chart.Selection.Xaxis
Apexcharts.Chart.Selection.Yaxis
Apexcharts.Chart.Sparkline
Apexcharts.Chart.Toolbar
Apexcharts.Chart.Toolbar.Tools
Apexcharts.Chart.Toolbar.Tools.CustomIcons
Apexcharts.Chart.Zoom
Apexcharts.Chart.Zoom.ZoomedArea
Apexcharts.Chart.Zoom.ZoomedArea.Fill
Apexcharts.Chart.Zoom.ZoomedArea.Stroke
Apexcharts.Common
Apexcharts.DataLabels
Apexcharts.DataLabels.Background
Apexcharts.DataLabels.Background.DropShadow
Apexcharts.DataLabels.DropShadow
Apexcharts.DataLabels.Style
Apexcharts.Fill
Apexcharts.Fill.Gradient
Apexcharts.Fill.Gradient.ColorStops
Apexcharts.Fill.Image
Apexcharts.Fill.Pattern
Apexcharts.Grid
Apexcharts.Grid.Column
Apexcharts.Grid.Padding
Apexcharts.Grid.Row
Apexcharts.Grid.Xaxis
Apexcharts.Grid.Xaxis.Lines
Apexcharts.Grid.Yaxis
Apexcharts.Grid.Yaxis.Lines
Apexcharts.Legend
Apexcharts.Legend.ItemMargin
Apexcharts.Legend.Labels
Apexcharts.Legend.Markers
Apexcharts.Legend.OnItemClick
Apexcharts.Legend.OnItemHover
Apexcharts.Markers
Apexcharts.Markers.Discrete
Apexcharts.Markers.Hover
Apexcharts.NoData
Apexcharts.NoData.Style
Apexcharts.PlotOptions
Apexcharts.PlotOptions.Bar
Apexcharts.PlotOptions.Bar.Colors
Apexcharts.PlotOptions.Bar.Colors.Ranges
Apexcharts.PlotOptions.Bar.DataLabels
Apexcharts.PlotOptions.Bubble
Apexcharts.PlotOptions.Candlestick
Apexcharts.PlotOptions.Candlestick.Colors
Apexcharts.PlotOptions.Candlestick.Wick
Apexcharts.PlotOptions.Heatmap
Apexcharts.PlotOptions.Heatmap.ColorScale
Apexcharts.PlotOptions.Heatmap.ColorScale.Ranges
Apexcharts.PlotOptions.Pie
Apexcharts.PlotOptions.Pie.DataLabels
Apexcharts.PlotOptions.Pie.Donut
Apexcharts.PlotOptions.Pie.Donut.Labels
Apexcharts.PlotOptions.Pie.Donut.Labels.Name
Apexcharts.PlotOptions.Pie.Donut.Labels.Total
Apexcharts.PlotOptions.Pie.Donut.Labels.Value
Apexcharts.PlotOptions.Radar
Apexcharts.PlotOptions.Radar.Polygons
Apexcharts.PlotOptions.Radar.Polygons.Fill
Apexcharts.PlotOptions.RadialBar
Apexcharts.PlotOptions.RadialBar.DataLabels
Apexcharts.PlotOptions.RadialBar.DataLabels.Name
Apexcharts.PlotOptions.RadialBar.DataLabels.Total
Apexcharts.PlotOptions.RadialBar.DataLabels.Value
Apexcharts.PlotOptions.RadialBar.Hollow
Apexcharts.PlotOptions.RadialBar.Hollow.DropShadow
Apexcharts.PlotOptions.RadialBar.Track
Apexcharts.PlotOptions.RadialBar.Track.DropShadow
Apexcharts.Series
Apexcharts.States
Apexcharts.States.Active
Apexcharts.States.Active.Filter
Apexcharts.States.Hover
Apexcharts.States.Hover.Filter
Apexcharts.States.Normal
Apexcharts.States.Normal.Filter
Apexcharts.Stroke
Apexcharts.Subtitle
Apexcharts.Subtitle.Style
Apexcharts.Theme
Apexcharts.Theme.Monochrome
Apexcharts.Title
Apexcharts.Title.Style
Apexcharts.Tooltip
Apexcharts.Tooltip.Fixed
Apexcharts.Tooltip.Items
Apexcharts.Tooltip.Marker
Apexcharts.Tooltip.OnDatasetHover
Apexcharts.Tooltip.Style
Apexcharts.Tooltip.X
Apexcharts.Tooltip.Z
Apexcharts.Xaxis
Apexcharts.Xaxis.AxisBorder
Apexcharts.Xaxis.AxisTicks
Apexcharts.Xaxis.Crosshairs
Apexcharts.Xaxis.Crosshairs.DropShadow
Apexcharts.Xaxis.Crosshairs.Fill
Apexcharts.Xaxis.Crosshairs.Fill.Gradient
Apexcharts.Xaxis.Crosshairs.Stroke
Apexcharts.Xaxis.Labels
Apexcharts.Xaxis.Labels.DatetimeFormatter
Apexcharts.Xaxis.Labels.Style
Apexcharts.Xaxis.Title
Apexcharts.Xaxis.Title.Style
Apexcharts.Xaxis.Tooltip
Apexcharts.Xaxis.Tooltip.Style
Apexcharts.Yaxis
Apexcharts.Yaxis.AxisBorder
Apexcharts.Yaxis.AxisTicks
Apexcharts.Yaxis.Crosshairs
Apexcharts.Yaxis.Crosshairs.Stroke
Apexcharts.Yaxis.Labels
Apexcharts.Yaxis.Labels.Style
Apexcharts.Yaxis.Title
Apexcharts.Yaxis.Title.Style
Apexcharts.Yaxis.Tooltip
Dependencies