'FillPattern after drillDown to countries on Highchart-react
Someone can help me please, i need fillPattern on province/city after i'm drillDown from world to each countries then image will show on the province/city of countries
example i want : enter image description here
Live example: https://codesandbox.io/s/highcharts-react-demo-forked-1f04sp?file=/demo.jsx
Solution 1:[1]
I prepared a demo for the USA where you can see how to apply the fill pattern for the drilldowned series.
events: {
drilldown(e) {
const chart = this;
chart.addSeriesAsDrilldown(e.point, {
data: data,
name: 'USA',
dataLabels: {
enabled: true,
format: '{point.properties.postal-code}'
},
color: {
pattern: {
aspectRatio: 3 / 2
}
},
});
// this part is a workaround for the bug
chart.setSize(void 0, void 0, false);
setTimeout(()=>{
// try set size in here to keep the initial animation and change the fill
// after the set timeout time
}, 500);
}
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Sebastian W?dzel |
