Closed skuske closed 4 years ago
Hello @skuske,
we prepared a workaround for you. Please try:
let chart = HIChart()
chart.events = HIEvents()
chart.events.load = HIFunction(jsFunction: "function() { var r = this.renderer; var filter = r.definition({ tagName: 'filter', id: 'grayscale', children: [{ tagName: 'feColorMatrix', type: 'matrix', values: '0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0' }] }); const style = document.createElement('style'); style.textContent = ` .highcharts-legend-item-hidden image { filter: url(#grayscale); }`; document.head.append(style); }")
options.chart = chart
@ihnatmoisieiev
What should I say? BRILLIANT! Works perfect. Many, many thanks!
@skuske we also have reported it in main repo: https://github.com/highcharts/highcharts/issues/14066
@ihnatmoisieiev
Thanks. However, I see this as a (minor) bug and not necessarily as an additional feature ... ;o)
But thanks again for a working solution. Much appreciated. Great service, as always!
I am using a custom series marker symbol, and that works just fine as it should.
However, if I hide the series from the chart, the marker symbol does not get grayscaled in the Legend, just as it does for the default marker symbols.
How can I get the custom marker symbol to grayscale in the Legend if the related series is hidden from the chart?
Many thanks for any help.