pie-chart

how to remove lines if values is 0 % in pie chart

北城余情 提交于 2019-12-04 04:46:24
问题 I'm working on a pie chart, for that, i'm using MPAndroidChart library, the values may contain 0% for any data or more than one data and I'm displaying values outside of piechart using setYValuePosition(PieDataSet.ValuePosition.OUTSIDE_SLICE) . I don't want to display 0% values in a pie chart, I got a solution for that to use value formatted. public class CustomPercentFormatter implements IValueFormatter { private DecimalFormat mFormat; public CustomPercentFormatter() { mFormat = new

How to show pie chart in android

时光毁灭记忆、已成空白 提交于 2019-12-04 02:51:01
I want to build an app in where I want to show memory and cpu usage map in a pie chart . However I have no idea about how to implement this . I have seen the following question : How to display the 3D pie chart asynchronously in android? But I could not resolve this issue . What can I do ? Guys , can u help me in this regard ? To "paint" a graph on android you can use a third-party-lib. All libs supports different types of charts. There are some graph-libs for Android: afreechart is based on jfreechart. License: LGPL Version: 0.0.4 AChartEngine License: Apache Version: 1.2.0 Maven: yes.

Pie, bar, line: SVG/VML better than Canvas

徘徊边缘 提交于 2019-12-04 02:41:16
I need to choose a library for "standard" charting: pies, lines and bars. From what I've read, it seems to me that the best format is SVG/VML, like Highcharts for example. SVG is becoming standard across all major browsers, now that IE 9 accepts it. It seems easier to rescale and export than Canvas. Still, I see that several charting libraries rely on Canvas. Am I missing something? Is there any reason for considering Canvas over SVG for such applications? You can generally achieve the same results with either. Both end up drawing pixels to the screen for the user. The major differentiators

Highcharts Pie Chart.How to set labels in two lines

╄→гoц情女王★ 提交于 2019-12-04 01:22:06
I'm creating a pie chart in highcharts. Does anybody know how to set data labels in two lines? I'm finding this problem when the data labels are too long. http://jsfiddle.net/larrytron/fSjnD/ $(function () { $('#container').highcharts({ chart: { plotBackgroundColor: null, plotBorderWidth: null, plotShadow: false }, title: { text: 'Browser market shares at a specific website, 2010' }, tooltip: { pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>' }, plotOptions: { pie: { allowPointSelect: true, cursor: 'pointer', dataLabels: { enabled: true, color: '#000000', maxStaggerLines:1,

Putting two Pie Charts in one

余生长醉 提交于 2019-12-03 17:36:57
I am trying to create a pie chart with my following data in R: 2009 2010 US 10 12 UK 13 14 Germany 18 11 China 9 8 Malaysia 7 15 Others 13 15 The command I am using is: slices<-c(10,13,18,9,7,13,12,14,11,8,15,15) lbls <- c("US","UK","Germany","China", "Malaysia", "Others","US","UK","Germany","China", "Malaysia", "Others") pct <- round(slices/sum(slices)*100) lbls <- paste(lbls,"%",sep="") lbls <- paste(lbls, pct) pie(slices,labels = lbls, col=rainbow(length(lbls)), main="Pie Chart of Countries") The figure that I am getting Now how can I configure the graph so that the countries have same

D3.js: Pie graph, adding a border only to the outter region

*爱你&永不变心* 提交于 2019-12-03 12:05:56
I got a pie graph in D3 with a stroke to separete every slice. However, I'd like to add a border only to the outter region of the slices, not in a continuos line but rather respecting the gaps created by the strokes in the original slices. See my image for clarifiation. Any thoughts on how to do that? See http://jsfiddle.net/4xk58/ arcs.append("path") .attr("fill", function (d, i) { return color(i); }) .attr("d", arc).style('stroke', 'white') .style('stroke-width', 5); I solved this by adding two extra arch sets, making up to three. The first one is the normal pie, WITHOUT strokes arcs.append(

How to avoid overlapping of labels & autopct in a matplotlib pie chart?

一个人想着一个人 提交于 2019-12-03 08:46:30
问题 My Python code is: values = [234, 64, 54,10, 0, 1, 0, 9, 2, 1, 7, 7] months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul','Aug','Sep','Oct', 'Nov','Dec'] colors = ['yellowgreen', 'red', 'gold', 'lightskyblue', 'white','lightcoral','blue','pink', 'darkgreen', 'yellow','grey','violet','magenta','cyan'] plt.pie(values, labels=labels, autopct='%1.1f%%', shadow=True, colors=colors, startangle=90, radius=1.2) plt.show() Is it possible to show the labels "Jan", "Feb", "Mar", etc. and the

Add text inside doughnut chart from chart js-2 in react

半世苍凉 提交于 2019-12-03 06:53:07
i want to add a text message inside my doughnut pie chart. To be more specific i want something like this: I came across the same issue here in stack overflow by they use chart js in jquery and since i'm new to javascript i got confused. This is how i define my pie chart: <Doughnut data={sectorsData} width={250} height={250} options={{ legend: { display: false }, maintainAspectRatio: false, responsive: true, cutoutPercentage: 60 }} /> My example uses the property text on the data to specify the inner text: const data = { labels: [...], datasets: [...], text: '23%' }; import React from 'react';

Pie chart using Charts library with swift

可紊 提交于 2019-12-03 05:56:57
问题 I am integrating pie chart in my app using Charts library and getting issue with chart data my code is import UIKit import Charts class ViewController: UIViewController { @IBOutlet weak var pieChartView: PieChartView! override func viewDidLoad() { super.viewDidLoad() let months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun"] let unitsSold = [10.0, 4.0, 6.0, 3.0, 12.0, 16.0] setChart(dataPoints: months, values: unitsSold) } func setChart(dataPoints: [String], values: [Double]) { var dataEntries:

Jquery Flot pie charts show data value instead of percentage

那年仲夏 提交于 2019-12-03 01:20:02
I can't figure out how to get flot.pie to change the data shown in the labels from a percentage of the "raw data" to the actual data. In my example i've created a pie chart with the numbers of read/unread messages. Number of read messages: 50. Number of unread messages: 150. The created pie shows the percentage of read messages as 25%. On this spot i want to show the actual 50 messages. See image below: The code i used to create the pie: var data = [ { label: "Read", data: 50, color: '#614E43' }, { label: "Unread", data: 150, color: '#F5912D' } ]; And: $(function () { $.plot($("#placeholder"),