Im using a highchart pie chart to create a donut chart but would like the legend icons to be circles any ideas??? Below is the mockup and the actual web version. Thanks...
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
- Can php detect if javascript is on or not?
Another way to achieve this can be overriding the style using CSS. Simply add class below to your stylesheet:
and this would override the default style for the SVG Rectangle element.
There's quite an easy fix. Just set the following properties in chartoptions:
For further reference, check highcharts api documentation.
Checkout this jsFiddle.
I prepared solution based on pie chart. Legend is generated on data points, automatically as HTML list. Then all elements gets colors from series, and use CSS3 to generate circle object (border-radius). As a result you need to add click event.
http://jsfiddle.net/N3KAC/1/
CSS:
In recent versions of Highcharts you can use
symbolWidth: width
andsymbolRadius: width/2
insidelegend: {}
.See this JSFiddle demonstration: http://jsfiddle.net/Wzs9L/