pie-chart

chartjs creating data array dynamically

谁说我不能喝 提交于 2020-01-07 05:46:23
问题 Im creating a Pie chart using chartjs library, and Im wondering how I could represent the values the will be need to render the chart dynamically, In chartjs.org tutorial the array of data is represented like this var data = [ { value: 300, color:"#F7464A", highlight: "#FF5A5E", labelColor : 'white', labelFontSize : '16' }, { value: 100, color: "#46BFBD", highlight: "#5AD3D1", labelColor : 'white', labelFontSize : '16' }, { value: 100, color: "#FDB45C", highlight: "#FFC870", labelColor :

r pie chart labels overlap ggplot2

不问归期 提交于 2020-01-07 02:59:31
问题 I'm trying to make a pie chart with several slices, and many of them have low values. The problem is that when I make the chart most of the labels overlap each other. The graphic is this: The data: Descripcion Freq Sumarios 17 Previsiones Legales 34 Multas SICORE 19 Multas ANSeS 7 Multas AFIP 5 Gastos Corresponsalía 22 Faltantes de Caja 470 Cargos Jubilaciones 2185 ATM Fraudes 10 ATM Diferencias 201 And the code: #armo el grafico pmas <- ggplot(cant_masivos_trim, aes(x=1, y=Freq, fill

Set colors on google piechart via dataTable JSON

﹥>﹥吖頭↗ 提交于 2020-01-06 07:17:11
问题 I am using the chartWrapper to pull in some JSON. I am wondering how I would go about settings the colours for each segment on the piechart. //draw the channel summary data $.getJSON("@Url.Action("SummaryData", new { id = Model.Id })", function(data) { var channelChartWrapper = new window.google.visualization.ChartWrapper({ chartType: "PieChart", dataTable: data, options: { title: "Title here" }, containerId: "summary-chart", }); channelChartWrapper.draw(); }); the data returned by the

Pie Chart Custom Legend

故事扮演 提交于 2020-01-06 04:43:07
问题 I am using highcharts to build a Pie chart, I am hiding the default legend that comes with highcharts and making my own. I am able to build one for line graphs, but when I do it for a pie chart, I can not get show()/hide() methods of the data to work because they are all in the same series. How can I get show()/hide() to work on a pie chart? var chart = $('#chartdiv').highcharts(); $(".legend div").html(""); $(chart.series).each(function(seriesKey, series){ $(series.data).each(function(k, v){

Controlling ticks and odd text in a pie chart generated from a factor variable in ggplot2

流过昼夜 提交于 2020-01-05 10:08:13
问题 I'm generating a simple pie chart with use of the code below: data(mtcars) mtcars$fac_var <- as.factor(mtcars$cyl) require(ggplot2); require(ggthemes) # Chart pie_test <- ggplot(mtcars, aes(x = factor(1), fill = fac_var)) + geom_bar(width = 1) + coord_polar(theta = "y") + ggtitle("Title") + theme_pander() + scale_fill_tableau(name = "Something") + theme(axis.title = element_blank()) The code produces the following chart: I'm interested in introducing two minor modifications to the chart above

GNUPLOT - Assign colours in pie chart

被刻印的时光 ゝ 提交于 2020-01-05 07:00:42
问题 I am trying generate a pie chart using GNUPLOT, I have already generate the plot, and I have assigned colour to the legend using an array. This is the code, I have used this question as reference script.sh #!/usr/bin/gnuplot set terminal pngcairo nocrop enhanced size 800,400 font "Siemens Sans,8" set output 'output.png' filename = 'source.dat' rowi = 1 rowf = 2 # obtain sum(column(2)) from rows `rowi` to `rowf` set datafile separator ',' stats filename u 2 every ::rowi::rowf noout prefix "A"

jqPlot Pie Chart Tooltips

瘦欲@ 提交于 2020-01-05 06:37:06
问题 Am I right in thinking that the Hightlighter class in jqPlot does not handle tooltips for the PieRenderer? I've spent quite a while trying to get them to work however I can't seem to get it to show the tooltip. If I am right, is there a way to handle the rollover of a segment and pass the data to a third party jQuery tooltip? Thanks. 回答1: Looking through the issues for jqplot, it would seem that there have been a few requests for this functionality, but it has not yet been implemented. Based

How do I clockwise animate Pie Chart onLoad in SVG

旧街凉风 提交于 2020-01-05 04:09:12
问题 I am stuck with pie chart which should animate clockwise onLoad. Here, is my pie chart fiddle I need this animation to work with brezier curve paths, for instance, <path d="M 276 63.03 C 329.93 63.03 381.86 78.24 421.4 105.63 L 276 222.79 M 276 63.03" /> I am also aware that, it can be achieved using snap.svg library but is unable workout in this case. Any help is appreciated. Thanks in advance! 回答1: You can use a nested animate and change some attribute with a progressive delay. In this

How do I create a pie chart in Java

北慕城南 提交于 2020-01-04 14:32:09
问题 I want to create a pie chart that displays percentages. How do I create a pie chart using JFrame in Java? This is what I have so far: import javax.swing.*; import java.awt.*; import java.util.*; public class PieChart extends JFrame{ private int Midterm; private int Quizzes; private int Projects; private int Final; public PieChart(){ setPercentage(); } private void setPercentage() { // TODO Auto-generated method stub } //construct a pie chart with percentages public PieChart(int Midterm, int

c# devexpress piechart series point color change

依然范特西╮ 提交于 2020-01-04 13:50:20
问题 I've made a dynamic 3d piechart using devexpress. I'm really impressed with how good the control feature is. I've hit a little bit of a downer though. I would like my pie chart points to have different colors that I set in code (this will later be changed by the user using some form of pallet or combo box, not sure yet). Unfortunatly I can't seem to get a color method for the points of my data series. Here's the code excluding the mass of commented out attempts: Series series1 = new Series(