Reputation: 1160
What I want to create in Highcharts.js in React Native:
I had 2 options :
chart.renderer.circle
and then add Image, Text, Shadow or zIndex.Has anyone done this type of graph? Can you suggest me a better way to draw this graph?
Most Imp thing for me is shadow effect!
Upvotes: 1
Views: 3204
Reputation: 39149
You can also use Highcharts.SVGRenderer
class to add an image:
// Build the chart
Highcharts.chart('container', {
...
}, function(chart) {
var textX = chart.plotLeft + (chart.series[0].center[0]);
var textY = chart.plotTop + (chart.series[0].center[1]);
chart.renderer.image(
'https://www.highcharts.com/samples/graphics/sun.png',
textX - 15,
textY - 15,
30,
30
).add();
});
Live demo: https://jsfiddle.net/BlackLabel/zp7suewr/
API Reference: https://api.highcharts.com/class-reference/Highcharts.SVGRenderer#image
Upvotes: 2