pie-chart

How to add events to the individual sections(arcs) of a pie chart created out of d3.js?

半世苍凉 提交于 2019-12-05 21:10:00
This is a basic code to create a pie chart for protocol distribution. In my .csv file, I have two columns viz., protocol name and the percentage.I want to add events on individual arcs. For example, when i click only on the arc containing TCP stats, it should lead to another page. Please help how can i do this. I was able to add click event for the pie chart as whole. <!DOCTYPE html> <meta charset="utf-8"> <style> body { font: 10px sans-serif; } .arc path { stroke: #fff; } </style> <body> <script src="http://d3js.org/d3.v3.min.js"></script> <script> var width = 960, height = 500, radius = Math

How to show pie chart in android

匆匆过客 提交于 2019-12-05 19:39:46
问题 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 ? 回答1: 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

Label not showing on mouse event JavaFx

寵の児 提交于 2019-12-05 18:53:25
I have a pie chart where i have added a mouse listener using this guide: Oracle guide to pie chart However when i run my program and click on the chart it doesnt do anything. I have tried to System.out.println(caption.getText()); and the text of the label is correct however the label is just not showing up. My code is as following: public void start(Stage stage) { Scene scene = new Scene(new Group()); stage.setTitle("Imported Fruits"); stage.setWidth(500); stage.setHeight(500); ObservableList<PieChart.Data> pieChartData = FXCollections.observableArrayList( new PieChart.Data("Grapefruit", 13),

Easy Pie Chart : Bug percentage not centered?

喜你入骨 提交于 2019-12-05 16:43:09
I have a symfony project, I use bootstrap for style, and I want to use Easy Pie Chart for a dashboard page. So, in base.html.twig : <html> <head> <meta charset="UTF-8" /> <title>{% block title %} Website {% endblock %}</title> {% block stylesheets %}{% endblock %} {% block javascripts %} {% javascripts 'js/jquery-1.10.2.min.js' 'js/bootstrap.min.js' 'js/typeahead.min.js' 'js/jquery.easypiechart.min.js' 'js/jquery.sparkline.min.js' %} <script type="text/javascript" src="{{ asset_url }}"></script> {% endjavascripts %} {% endblock %} <link rel="icon" type="image/x-icon" href="{{ asset('img

Creating a pie chart in swift

被刻印的时光 ゝ 提交于 2019-12-05 15:03:56
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() self.contentMode = .Redraw } override fun drawRect(rect: CGRect) { // draw the chart in here } } What

pie chart/plot in swift

半城伤御伤魂 提交于 2019-12-05 13:54:33
I've tried so many different ways of add plots package from GitHub or using core plots or combining objective-c into swift, but it appeared so many problems during the process, and during this week I didn't make a successful chart. I'm really depressed. Is there anyone who succeed in creating a pie chart in swift? The similar questions seem don't have successful answers. I would really appreciate your help! Don't be depressed. You just have to add a more specific question to get more help. For example, if you start from scratch and try to integrate a plots package from Github, you have to say

Change asp chart legend label width

≯℡__Kan透↙ 提交于 2019-12-05 13:14:43
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("Verdana", 12f, FontStyle.Bold),Color.Black)); Chart1.Series[0].XValueMember = "COLUMN_NAME"; Chart1

Pie chart not showing all the values in SSRS 2014

╄→尐↘猪︶ㄣ 提交于 2019-12-05 13:06:01
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? 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 steps: Right click on the pie chart and change it to line chart. Now on individual bar right click and select

How to create dynamic color list for charts

孤者浪人 提交于 2019-12-05 12:37:37
How to create dynamic color list for charts Basically i have a different value in my database or each values contain each percentage and i need to show this percentages in pie chart with different colors .... This is the example code of pie chart in static way <color value="#99CDFB"/> <color value="#3366FB"/> <color value="#0000FA"/> <color value="#F8CC00"/> <color value="#F89900"/> <color value="#F76600"/> but i need dynamic way using PHP ( for loop / foreach loop ) like this $color = ""; foreach($data as $data){ echo '<color value=".$color."/>'; } and i don't know to create dynamic color

Google Pie chart: remove white gap between pie slices

霸气de小男生 提交于 2019-12-05 10:37:06
Similar to this question , but for Google Pie Charts: How can I remove the white lines between the slices on a Google Pie Chart: On the image above, I want to remove the white space highlighted by the green arrow. You can get rid of that gap by setting the pieSliceBorderColor to "transparent" . Try the following on Google Code Playground : function drawVisualization() { // Create and populate the data table. var data = google.visualization.arrayToDataTable([ ['Task', 'Hours per Day'], ['Work', 11], ['Eat', 2], ['Commute', 2], ['Watch TV', 2], ['Sleep', 7] ]); // Create and draw the