This repository was archived by the owner on Apr 6, 2021. It is now read-only.
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
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:[]