Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Highcharts: Custom button - symbol is misplaced

I have added a new custom button, with my own symbol image: But the image is not placed as should :( Can some one help? Thanks Chanan

enter image description here

Here is how i added the button:

    exporting: {
        buttons: {
            'myButton': {
                _id: 'myButton',
                symbol: 'url(images/gallery/reset_zoom.jpg)',
                x: -62,
                symbolFill: '#B5C9DF',
                hoverSymbolFill: '#779ABF',
                onclick: function() {
                    alert('click!')
                }
            }
        }
    }
like image 449
Chanan Berler Avatar asked Feb 17 '23 03:02

Chanan Berler


1 Answers

Found the answer :) using symbolX and symbolY

    exporting: {
        buttons: {
            'myButton': {
                _id: 'myButton',
                symbol: 'url(images/gallery/reset_zoom.jpg)',
                symbolX:6,
                symbolY:6,
                x: -62,
                symbolFill: '#B5C9DF',
                hoverSymbolFill: '#779ABF',
                onclick: function() {
                    alert('click!')
                }
            }
        }
    }
like image 138
Chanan Berler Avatar answered Mar 03 '23 14:03

Chanan Berler