Simple chart.js Example

Source Code

    import com.fastscala.chartjs.ChartJsNullable2Option._
    <canvas id="chart"></canvas> ++ JS.inScriptTag(ChartJs(
      `type` = BarChartType,
      data = ChartData(
        datasets = List(
          BarChartDataset(
            label = "dataset 1",
            data = SimpleNumbersChartDatasetData(List(12, 19, 3, 5, 2, 3.0)),
            borderColor = "#91C8E4",
            backgroundColor = "#4682A9"
          )
        ),
        labels = List("Test", "Test", "Test", "Test")
      )
    ).installInCanvas("chart").onDOMContentLoaded)