Skip to content

Instantly share code, notes, and snippets.

@pedrofurla
Last active August 29, 2015 13:59
Show Gist options
  • Select an option

  • Save pedrofurla/10625689 to your computer and use it in GitHub Desktop.

Select an option

Save pedrofurla/10625689 to your computer and use it in GitHub Desktop.
Playframework templates vs Javascript.
@reports map { case(r@Report(title, lines, _)) =>
{
name: '@title',
color: '#4070A0',
type: 'column',
yAxis: 0,
//data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6],
data: [ @lines.map{ case ReportLine(rows, time, timeUnit) => @time }.mkString(",") ],
tooltip: { valueSuffix: ' µs' }
}
} makeString ","
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment