HighCharts tooltip not works

HighCharts tooltip not works

  

Hi everybody,

I have a problem with tooltip in highcharts. I see and tested in HighCharts Demo and works but in Outsystems not works. I have the follow code, anyone helps me, please?


AdvancedFormat_Init(DataPointFormats:,DataSeriesFormats:,XAxisJSON:,YAxisJSON:,HighchartsJSON:
"
title: {
    text: 'TOP 10 - Unidades de Produtos',
style: {
    color: 'black',
    fontSize: '16px',
    fontWeight: 'bold'}
},

colors: ['#2B908F', '#90EE7E', '#F45B5B', '#DB843D', '#AAEEEE', '#FF0066', '#EEAAEE', '#55BF3B', '#DF5353', '#7798BF'],

   tooltip: {
      enabled: true,
      useHTML: true,

      pointFormat: 'Population in 2017',

      backgroundColor: 'rgba(0, 0, 0, 0.85)',
      style: {
         color: '#F0F0F0'
      }
   },


Regards, Paulo Torres

Solution

Paulo Torres wrote:

Hi everybody,

I have a problem with tooltip in highcharts. I see and tested in HighCharts Demo and works but in Outsystems not works. I have the follow code, anyone helps me, please?


AdvancedFormat_Init(DataPointFormats:,DataSeriesFormats:,XAxisJSON:,YAxisJSON:,HighchartsJSON:
"
title: {
    text: 'TOP 10 - Unidades de Produtos',
style: {
    color: 'black',
    fontSize: '16px',
    fontWeight: 'bold'}
},

colors: ['#2B908F', '#90EE7E', '#F45B5B', '#DB843D', '#AAEEEE', '#FF0066', '#EEAAEE', '#55BF3B', '#DF5353', '#7798BF'],

   tooltip: {
      enabled: true,
      useHTML: true,

      pointFormat: 'Population in 2017',

      backgroundColor: 'rgba(0, 0, 0, 0.85)',
      style: {
         color: '#F0F0F0'
      }
   },


Regards, Paulo Torres

Hello Paulo,


I did some digging and it seems that the default formatter attribute is overriding what you define in the tooltip attribute.

As a workaround try to force the formatter to be a null function. Something like this :

SyntaxEditor Code Snippet

   tooltip: {
      enabled: true,
      useHTML: true,
      
      pointFormat: 'Population in 2017',

      backgroundColor: 'rgba(0, 0, 0, 0.85)',
      style: {
         color: '#F0F0F0'
      },
      formatter:null
   },

I believe that this forces the default formatter function to be null and renders what you have defined in the tooltip. 

I didn't found any prettier way to do it.


Cheers,

Miguel Amado


Solution

Miguel Amado wrote:

Paulo Torres wrote:

Hi everybody,

I have a problem with tooltip in highcharts. I see and tested in HighCharts Demo and works but in Outsystems not works. I have the follow code, anyone helps me, please?


AdvancedFormat_Init(DataPointFormats:,DataSeriesFormats:,XAxisJSON:,YAxisJSON:,HighchartsJSON:
"
title: {
    text: 'TOP 10 - Unidades de Produtos',
style: {
    color: 'black',
    fontSize: '16px',
    fontWeight: 'bold'}
},

colors: ['#2B908F', '#90EE7E', '#F45B5B', '#DB843D', '#AAEEEE', '#FF0066', '#EEAAEE', '#55BF3B', '#DF5353', '#7798BF'],

   tooltip: {
      enabled: true,
      useHTML: true,

      pointFormat: 'Population in 2017',

      backgroundColor: 'rgba(0, 0, 0, 0.85)',
      style: {
         color: '#F0F0F0'
      }
   },


Regards, Paulo Torres

Hello Paulo,


I did some digging and it seems that the default formatter attribute is overriding what you define in the tooltip attribute.

As a workaround try to force the formatter to be a null function. Something like this :

SyntaxEditor Code Snippet

   tooltip: {
      enabled: true,
      useHTML: true,
      
      pointFormat: 'Population in 2017',

      backgroundColor: 'rgba(0, 0, 0, 0.85)',
      style: {
         color: '#F0F0F0'
      },
      formatter:null
   },

I believe that this forces the default formatter function to be null and renders what you have defined in the tooltip. 

I didn't found any prettier way to do it.


Cheers,

Miguel Amado


Hi Miguel,

You are a biggest one! Works perfectly.


Regards, Paulo Torres