Skip to content

Commit

Permalink
chore: log some useful info to the console
Browse files Browse the repository at this point in the history
  • Loading branch information
HendrikThePendric committed Nov 19, 2024
1 parent 8beadbf commit f6405f9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/visualizations/config/adapters/dhis_highcharts/events/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ import loadCustomSVG from './loadCustomSVG/index.js'
export const getEvents = (visType) => ({
events: {
load: function () {
console.log('THIS HAPPENS AFTER THE CHART IS CREATED')
console.log(
'on load the yAxis does have a max: ',
this.yAxis[0].max
)
// Align legend icon with legend text
this.legend.allItems.forEach((item) => {
if (item.legendSymbol) {
Expand All @@ -19,5 +24,11 @@ export const getEvents = (visType) => ({
})
loadCustomSVG.call(this, visType)
},
render: function () {
console.log(
'on render the yAxis does have a max: ',
this.yAxis[0].max
)
},
},
})
7 changes: 7 additions & 0 deletions src/visualizations/config/generators/highcharts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,13 @@ export default function (config, el) {

drawLegendSymbolWrap()

console.log('HERE WE PASS THE CONFIG TO HIGHCHARTS')
console.log('There is only one yAxis: ', config.yAxis.length === 1)
console.log(
'That single yAxis does not have a max',
typeof config.yAxis[0].max === 'undefined'
)

return new H.Chart(config)
}
}

0 comments on commit f6405f9

Please sign in to comment.