donut-chart

Using Chartist.js how do you change the color of the stroke for a donut chart?

折月煮酒 提交于 2020-01-02 00:14:11
问题 Hello I am trying to create the following donut chart using Chartist.js: GOAL CHART This is what the chart looks like currently: Chartist.js Donut Chart I am trying to find where or how I can change the colors of this chart to match the 1st donut chart. The red and pink seem to be the defaults. I haven't been able to find any documentation of how to accomplish this goal. I would also like to customize the size of the stroke and the size of the chart itself. Any help is greatly appreciated!

ChartJS - Donut charts with multiple rings

风流意气都作罢 提交于 2020-01-01 05:16:11
问题 Is it possible to create a donut chart with multiple rings using ChartJS as shown below? 回答1: You can find out the solution at fiddle link var ctx = document.getElementById("chart-area").getContext("2d"); var myDoughnut = new Chart(ctx, config); var config = { type: 'doughnut', data: { datasets: [{ data: [ 10,20,30 ], backgroundColor: [ "#F7464A", "#46BFBD", "#FDB45C" ], }, { data: [ randomScalingFactor(), randomScalingFactor(), randomScalingFactor() ], backgroundColor: [ "#F7464A", "#46BFBD"

How do I color labels for my pie chart in D3?

拜拜、爱过 提交于 2019-12-22 18:06:22
问题 I started out with the following example: http://jsfiddle.net/nrabinowitz/GQDUS/ I am trying to get the labels for each arc to be the color of the arc. I have gotten it to where it colors all the labels the same color. But I do now know how to access each individual label and change the color. In my code I have done the following for the last line: arcs.append("svg:text").attr("transform", function (d){var c = arc.centroid(d); x = c[0]; y = c[1]; h = Math.sqrt(x*x + y*y); return "translate("

SVG Adding radial gradient to donut chart

北城余情 提交于 2019-12-18 16:57:37
问题 I'm drawing charts with d3.js. Is it possible to add radial gradients to donut chart, how on this picture? 回答1: Assuming the arc parts are path elements that are filled you can use a radial gradient to get that result. See this similar question, we can reuse the example to arrive at: var dataset = { apples: [53245, 28479, 19697, 24037, 40245], }; var width = 460, height = 300, radius = Math.min(width, height) / 2; var color = d3.scale.category20(); var pie = d3.layout.pie() .sort(null); var

CSS3 simple donut chart

久未见 提交于 2019-12-18 11:24:40
问题 What I'm trying to do is create a simple donut chart. I'm currently using CSS(3) only but I don't know if it's possible without javascript. What I have so far: http://jsfiddle.net/aBP5Q/ HTML: <div class="donut-container" style="background: #9C0;"> <div class="donut-inner"> <div class="donut-label">HTML</div> </div> </div> CSS: .donut-container { width: 150px; height: 150px; float: left; -webkit-border-radius: 75px; -moz-border-radius: 75px; border-radius: 75px; margin-right: 20px; } .donut

How to change label color in Donut Morris Chart (customized label colors)

和自甴很熟 提交于 2019-12-14 03:57:05
问题 I want to change Label Color in Morris Donut chart: For BusStop: Label Color should be Red For Fence: Label Color should be Blue For Route: Label Color Should be Yellow or anything... Code Pen Example I tried by doing: data: [ { label: 'BusStop', value:5, labelColor:"#EC407A", }, { label: 'Fence', value: 6, labelColor:"#00897B", }, { label: 'Route', value: 2, labelColor:"#C0CA33", } ], labelColor:"#9CC4E4", //this is Constant for all label but I need customized labelColors It's ok, if it is

Highcharts donut chart without inner pie?

旧城冷巷雨未停 提交于 2019-12-13 11:32:21
问题 I've been searching for the solution to generate the simplest donut chart with Highcharts library. However, all examples of Highcharts show the style of chart with both inner pie and outer donut (refer to: http://www.highcharts.com/demo/pie-donut) How can I get rid of the inner pie and just keep the outer donut, just like other libraries do? (something like RGraph: http://www.rgraph.net/examples/donut.html) Thank you. 回答1: You just need to provide the data as an array of two element (key /

D3.js donut chart… arc.centroid(d) is not influenced by d.innerRadius and d.outerRadius

有些话、适合烂在心里 提交于 2019-12-13 01:24:32
问题 I'm creating a donut (or Piechart) and I want to place the labels just outside the area. I've created a fiddle http://jsfiddle.net/VeeTee/mA3V7/ for it. arcs.append("svg:text") .attr("transform", function(d) { //this is where I want to make a translation to the outside border d.innerRadius = radius; d.outerRadius = height/2; return "translate(" + arc.centroid(d) +")"; }) .attr("dy", ".35em") .attr("text-anchor", "middle") .text(function(d, i) { return d.value.toFixed(2); }); arc.centroid(d) -

Morris donut graphs. Very long and small labels

北慕城南 提交于 2019-12-12 21:31:29
问题 I have very long labels on my morris donut graphs. Because of their long it's very hard to read. I would like to have some kind of popup with label when I hover on that text. But there are no css classes to bind a handler. js code: Morris.Donut({ element: 'donut-example', data: [ {label: "Download SalesD DDDDDDDDDDDDDDDDD", value: 12}, {label: "In-Store Sales AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", value: 30}, {label: "Mail-Order Sales VVVVVVVVVVVVVVV", value: 20} ] }); I've tried formatter,

morrisjs donut drawn away from center point

时光总嘲笑我的痴心妄想 提交于 2019-12-12 05:29:50
问题 Chart is drawn from start each time an option is clicked (on-click event). On first couple of times the donut is drawn correctly ie with label at center, but very often donut draws away from the center. Images are shown for both correct and faulty charts. I have hi lighted border of the div to show the position of donut. This is how it displays in view: <div id="donut_div" style="width:425px;height:325px;border:1px solid red;padding:8px;"></div> Javascript code: var neg_pts=91, pos_pts =10;