Sha256: 8d567a8019268676f77026e4427163f9dd9c054ac505b0a0105f47b95a93d8e5

Contents?: true

Size: 946 Bytes

Versions: 293

Compression:

Stored size: 946 Bytes

Contents

import { commonSettings } from '../pb_dashboard/commonSettings.js'
import typography from '../tokens/_typography.scss'

const markerStyles = (highchart) => {
  highchart.plotOptions.line.marker.enabled = true
  highchart.plotOptions.series.marker.enabled = true
  highchart.plotOptions.series.marker.fillColor = 'white'
  highchart.plotOptions.series.marker.lineWidth = 2
}

const fixTooltipStyles = () => {
  document.getElementById('main-view').setAttribute('style', 'position: static !important')
}

const styleDataLabels = (highchart) => {
  const series = highchart.plotOptions.series

  series.dataLabels.style.fontFamily = typography.font_family_base
  series.dataLabels.style.fontSize = typography.text_small
  series.dataLabels.style.fontWeight = typography.bold
}

const pbLineGraph = (highchart) => {
  commonSettings(highchart)
  styleDataLabels(highchart)
  markerStyles(highchart)
  fixTooltipStyles()
}

export default pbLineGraph

Version data entries

293 entries across 293 versions & 1 rubygems

Version Path
playbook_ui-10.3.0 app/pb_kits/playbook/pb_line_graph/lineGraphSettings.js
playbook_ui-10.2.1 app/pb_kits/playbook/pb_line_graph/lineGraphSettings.js
playbook_ui-10.2.0 app/pb_kits/playbook/pb_line_graph/lineGraphSettings.js
playbook_ui-10.1.0 app/pb_kits/playbook/pb_line_graph/lineGraphSettings.js
playbook_ui-10.0.3.pre.alpha.walkthrough2 app/pb_kits/playbook/pb_line_graph/lineGraphSettings.js
playbook_ui-10.0.3.pre.alpha.walkthrough app/pb_kits/playbook/pb_line_graph/lineGraphSettings.js
playbook_ui-10.0.1.alpha.railscusticon app/pb_kits/playbook/pb_line_graph/lineGraphSettings.js
playbook_ui-10.0.2.pre.alpha.pre.iconfix app/pb_kits/playbook/pb_line_graph/lineGraphSettings.js
playbook_ui-10.0.1.alpha.rtflexfix app/pb_kits/playbook/pb_line_graph/lineGraphSettings.js
playbook_ui-10.0.0.pre.alphafonts app/pb_kits/playbook/pb_line_graph/lineGraphSettings.js
playbook_ui-10.0.1 app/pb_kits/playbook/pb_line_graph/lineGraphSettings.js
playbook_ui-10.0.0 app/pb_kits/playbook/pb_line_graph/lineGraphSettings.js
playbook_ui-9.19.0.pre.alpha.pre.fonts2 app/pb_kits/playbook/pb_line_graph/lineGraphSettings.js
playbook_ui-9.19.0 app/pb_kits/playbook/pb_line_graph/lineGraphSettings.js
playbook_ui-9.19.0.pre.alphafonts app/pb_kits/playbook/pb_line_graph/lineGraphSettings.js
playbook_ui-9.18.0.flow.bin.alpha app/pb_kits/playbook/pb_line_graph/lineGraphSettings.js
playbook_ui-9.18.0 app/pb_kits/playbook/pb_line_graph/lineGraphSettings.js
playbook_ui-9.17.0 app/pb_kits/playbook/pb_line_graph/lineGraphSettings.js
playbook_ui-9.17.0.pre.decouple.website2 app/pb_kits/playbook/pb_line_graph/lineGraphSettings.js
playbook_ui-9.16.0 app/pb_kits/playbook/pb_line_graph/lineGraphSettings.js