{"size": 770, "ext": "es6", "max_stars_repo_path": "src/main/resources/site/macros/highchart/highchart.es6", "max_stars_repo_name": "runejo/mimir", "max_stars_repo_stars_event_min_datetime": "2020-03-10T11:25:12.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-23T08:09:13.000Z", "max_issues_repo_path": "src/main/resources/site/macros/highchart/highchart.es6", "max_issues_repo_name": "statisticsnorway/mimir", "max_issues_repo_issues_event_min_datetime": "2020-03-23T16:22:51.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-09T14:07:12.000Z", "max_forks_repo_path": "src/main/resources/site/macros/highchart/highchart.es6", "max_forks_repo_name": "runejo/mimir", "max_forks_repo_forks_event_min_datetime": "2021-02-25T10:29:49.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-16T10:04:19.000Z"}
{"max_stars_count": 4, "max_issues_count": 205, "max_forks_count": 2, "avg_line_length": 32.0833333333, "max_line_length": 126, "alphanum_fraction": 0.7077922078}
const highchartController = __non_webpack_require__('../../parts/highchart/highchart')
// const dividerController = __non_webpack_require__('../../parts/divider/divider')

const {
  renderError
} = __non_webpack_require__('/lib/ssb/error/error')

exports.macro = function(context) {
  try {
    // const divider = dividerController.preview(context, {
    //   dark: false
    // })

    const highchart = highchartController.preview(context, context.params.highchart)

    if (highchart.status && highchart.status !== 200) throw new Error(`Highchart with id ${context.params.highchart} missing`)
    // highchart.body = divider.body + highchart.body + divider.body

    return highchart
  } catch (e) {
    return renderError(context.request, 'Error in macro', e)
  }
}
