For an project i need to realise an chart with two circles. It need to looks like this one:
Is there an Jquery solution that support this? I already tried with Jqplot but with that plug-in i can't succeed to create something like this. I tried with this code:
// Create chart
var plot1 = $.jqplot('pie_chart', [s2,s1], {
seriesDefaults: {
renderer:$.jqplot.DonutRenderer,
rendererOptions:{
startAngle: -90,
showDataLabels: true,
dataLabels: 'value',
innerDiameter :0,
padding:5,
highlightMouseOver:false
}
}
});
//Theming based in the rendered module items in the HTML
temp = {
seriesStyles: {seriesColors: array2},
grid: {
backgroundColor: 'rgba(0,0,0,0)',
borderWidth: 0,
shadow: false
}
};
plot1.themeEngine.newTheme('uma', temp);
plot1.activateTheme('uma');
But the colors are for the inner and outer ring the same and create something like this:
The settings for the style are for the inner and outer ring. In my case i need to give the outer ring an different style.
Can i use this plug-in or do i need to use an other Jquery plug-in to realise my chart?
I found an solution wich works with d3.js ( http://d3js.org/ ):
http://bl.ocks.org/mbostock/4063423
Works fine for me! Currently looks like this:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.