gmazzamuto / ng2-google-charts

Angular Google Charts module
https://www.devrandom.it/software/ng2-google-charts/
MIT License
120 stars 64 forks source link

How to customize tooltip for Candlestick chart #111

Closed duangrudee closed 4 years ago

duangrudee commented 4 years ago

Hi,

According to this document, https://developers.google.com/chart/interactive/docs/gallery/candlestickchart

I can set a tooltip of Candlestick chart by assigning the value to the 5th column, but when I did the component give me this error "Last domain does not have enough data columns (missing 3)"

This is my chart data

candleStickChartData =  {
            chartType: 'CandlestickChart',
            dataTable:
             [  
                ["Mon", 0, 0, 22000000, 22000000, "Monday tooltip"],
                ["Tue", 22000000, 22000000, 105266000, 105266000, "Tuesday tooltip"]
            ],
            opt_firstRowIsData: true,
            options: {
              legend: 'none',
              bar: { groupWidth: '100%' }, // Remove space between bars.
              candlestick: {
                fallingColor: { strokeWidth: 0, fill: '#a52714' }, // red
                risingColor: { strokeWidth: 0, fill: '#0f9d58' }   // green
              }
            }
          };

Thanks,

duangrudee commented 4 years ago

Sorry, I just found the answer here. https://github.com/gmazzamuto/ng2-google-charts/issues/91