Skip to content
This repository was archived by the owner on Apr 6, 2021. It is now read-only.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Simple Scala generator of HighCharts' config in Javascript
Get the highchars javascript library from www.highcharts.com


Usage:

  val chart = new Chart(defaultSeriesType = SeriesType.Column)
  val title = new Title(text = "chart")

  val xAxis = new Axis(categories = Array("jan", "feb"))
  val yAxis = new Axis(title = new Title(text = "load"))

  var highChart: HighChart = _

  before {
    highChart = new HighChart(chart = chart,
      title = title,
      xAxis = xAxis,
      yAxis = yAxis)
  }

  "HighCharts" should " generate" in {
    val serializedChart = highChart.build("container")

    serializedChart should equal("""chart:{"renderTo":"container","defaultSeriesType":"column"},title:{"text":"chart"},xAxis:{"categories":["jan","feb"]},credits:{"enabled":false},tooltip:{"shared":true},yAxis:{"title":{"text":"load"}},series:[]""")
  }


serializedChart =
  chart:{"renderTo":"container","defaultSeriesType":"column"},title:{"text":"chart"},xAxis:{"categories":["jan","feb"]},credits:{"enabled":false},tooltip:{"shared":true},yAxis:{"title":{"text":"load"}},series:[]

About

No description, website, or topics provided.

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages