pie-chart

Label names are not displayed from input data in pie transition chart of d3.js

試著忘記壹切 提交于 2019-12-07 16:06:37
问题 I am using d3.js to draw a pie transition chart. But when labels are placed in the data array as show below: data = [{"label":"sector1", "value":25}, {"label":"sector2", "value":45}] The pie chart won't be displayed. Instead " NaN " will be printed. The complete code is pasted below: var w = 400, h = 400, r = Math.min(w, h) / 2, data = [{"label":"sector1", "value":25}, {"label":"sector2", "value":45}], // Data with label-value pairs color = d3.scale.category20(), arc = d3.svg.arc()

Pie chart not showing all the values in SSRS 2014

a 夏天 提交于 2019-12-07 11:45:08
问题 I created the pie chart in SSRS as given below. I enabled the labels by right clicking on pie chart and click show labels. When I preview the chart I cant see all the labels. The only label visible is for the biggest portion in the pie. I tried to increase the size of the chart but no effect. Any idea? 回答1: No info is available but finally I learned the trick. I think there is a bug because of which only one label is shown (403 in my case) on the pie chart. To solve the problem follow the

Creating a pie chart in swift

99封情书 提交于 2019-12-07 11:42:01
问题 I'm trying to create a pie chart in swift, and would like to create the code from scratch rather than use a 3rd party extension. I like the idea of it being @IBDesignable, so I started with this: import Foundation import UIKit @IBDesignable class PieChart: UIView { var data: Dictionary<String,Int>? required init(coder aDecoder: NSCoder) { super.init(coder:aDecoder)! self.contentMode = .Redraw } override init(frame: CGRect) { super.init(frame: frame) self.backgroundColor = UIColor.clearColor()

Change asp chart legend label width

本秂侑毒 提交于 2019-12-07 07:02:34
问题 Aspx <asp:Chart ID="Chart1" runat="server" Width="600px"> <Series> <asp:Series Name="Series1" ChartType="Pie" IsValueShownAsLabel="True" Legend="Legend1"> </asp:Series> </Series> <ChartAreas> <asp:ChartArea Name="ChartArea1" AlignmentOrientation="All"> <AxisX TitleAlignment="Near"> </AxisX> </asp:ChartArea> </ChartAreas> <Legends> <asp:Legend Name="Legend1" > </asp:Legend> </Legends> </asp:Chart> Code behind Chart1.Titles.Add(new Title("Completed/Pending Count Anaysis",Docking.Top,new Font(

How to create a pie chart with percentage labels using ggplot2? [closed]

痞子三分冷 提交于 2019-12-06 15:14:52
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . I have a data frame and want to create a pie chart on one specific column that indicates the percentage of each level in this column. data <- data.frame(a=c("a1","a1","a2","a3","a1","a2","a3","a4","a2","a1","a5","a4","a3"), b=1:13) In other words, I want to have a pie chart that

redraw pie chart in highchart

我只是一个虾纸丫 提交于 2019-12-06 14:40:58
问题 suppose I have 4 slices having 20%, 30%, 30% and 20%. If I make 4th slice(20%) inactive, the other slices should adjust themselves and occupy 100 %. how to do this in highcharts? Thank you. 回答1: I don't think it's possible to alter this behavior. Instead you need to remove the point all together for the other slices to add up to 100. Here is an example that shows the difference between legend-toggle and point remove: jsfiddle 回答2: I think this should be the standard behavior :) opts

How to display Text on a PieChart?

丶灬走出姿态 提交于 2019-12-06 13:41:05
I have Created a PieChart Using the following Code. Here, I Have taken the sum of x and y as 100% to display the x% as red color and y% as green color on pieChart. On the red color i want to display the exact x% (Example 45% (or) 55% ) and on the green color i want to display the exact y% (Example 55% (or) 45% ). In my application the X and Y values are Variables. Those Values are changing each time when i run my application. I want to display the pieChart with green and red colors with the percentage on those regions. How Can i make frames to display percentages on that regions? .m file -

add an image for each slice in iOS-chart pieChart

好久不见. 提交于 2019-12-06 11:20:50
I'm using ios-charts . I want to create a pie chart like below image. I have done all the confings, but I have problem with adding the image in the circle beside the values outside the circle. Can anybody help me how to to add the circles and image inside it ? UPDATED : note that the pie chart will scroll and those images should scroll with the related slices. UPDATED : I used @Aditya Garg sample code to draw images beside the position of labels, and my chart is now looks like this : I set the imageViewFrame like this: imageView.frame = CGRect(x: xPos-10, y: yPos+10, width: 20, height: 20)

How to plot a pie chart with the first wedge on top, in Python? [matplotlib]

主宰稳场 提交于 2019-12-06 09:57:09
问题 How can a pie chart be drawn with Matplotlib with a first wedge that starts at noon (i.e. on the top of the pie)? The default is for pyplot.pie() to place the first edge at three o'clock, and it would be great to be able to customize this. 回答1: Just because this came up in a Google search for me, I'll add that in the meantime, matplotlib has included just this as an additional argument to the pie function. Now, one can call plt.pie(data, start_angle=90) to have the first wedge start at noon.

Pie charts in reactjs

对着背影说爱祢 提交于 2019-12-06 09:46:31
I'm trying to implement a pie chart in my web application and i found this as a good source. https://github.com/reactjs/react-chartjs But it does not provide the way to give chartData and chartOptions inorder to make it work. How can i do this? my code import React, {Component} from 'react'; var LineChart = require("react-chartjs").Line; class PieChart extends Component { constructor() { super(); } render() { return ( <div className=""> <LineChart data={chartData} options={chartOptions} width="600" height="250"/> </div> ); } } export default PieChart; I get these errors 12:34 error 'chartData'