pie-chart

D3.JS - how do I add gridlines to my pie chart

久未见 提交于 2020-01-04 09:36:05
问题 I have extended the pie-chart example at: with pies that vary in radius depending on a percentage. I would like to add gridlines (circles) every 20 percent, but I can't figure out how. here is the updated csv: age,population,percent <5,2704659,67 5-13,4499890,38 14-17,2159981,91 18-24,3853788,49 25-44,14106543,71 45-64,8819342,88 =65,612463,64 and here is the updated code with pie-parts of different radius: <!DOCTYPE html> <meta charset="utf-8"> <style> body { font: 10px sans-serif;

How to add some text in google piechart pieHole

孤者浪人 提交于 2020-01-04 06:07:29
问题 visualization.PieChart with pieHole , I just want to give some custom text inside pieHole` is this possible? Any idea how to do his? My code is var chart6 = new google.visualization.PieChart(document.getElementById('chart6')); chart6.draw(data, {width: 650, height: 259, title: 'Browser bounce rate', colors:['#058DC7','#50B432','#ED561B','#EDEF00','#24CBE5','#64E572'], areaOpacity: 0.1, pieHole: 0.4, hAxis: {textPosition: 'in', showTextEvery: 5, slantedText: false, textStyle: { color: '#FFFFFF

wrong labeling in ggplot pie chart

[亡魂溺海] 提交于 2020-01-04 05:44:32
问题 I am trying to create a pie chart for percentage values, when I try to label them the labeling is wrong, I mean the values are pointing the wrong place in the graph. ggplot(Consumption_building_type, aes(x="", y=percentage, fill=Building_type))+ geom_bar(width = 0.5,stat ="identity")+coord_polar(theta = "y",direction = -1)+geom_text(aes(x=1.3,y = percentage/3 + c(0, cumsum(percentage)[- length(percentage)]),label = round(Consumption_building_type$percentage,0))) + theme_void()+ scale_fill

Achart engine Onclick pie chart slice not working sometimes a bug?

拥有回忆 提交于 2020-01-04 02:41:27
问题 i am working on a pie chart and i am using AchartEngine. i have the pie chart like this: Image of a Pie Chart i have added the onclick to the slices but sometimes only the green slice onlick will not work. this is my code: mChartView = ChartFactory.getPieChartView(this, adc.buildCategoryDataset("Project budget", values), renderer); mChartView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { SeriesSelection seriesSelection = mChartView

unknown white lines when saving pie chart as pdf

时间秒杀一切 提交于 2020-01-03 13:41:08
问题 When I save a pie chart as pdf, the pdf has unknown white lines. To simplify the question, I modify the code to its most generic form as the following. clc; h=pie(1); %set the pie chart color to black h(1).FaceColor = 'k'; The reason I choose to use black color is the white lines contrast most with a black background. Please see the attached pdf figure. I also find a similar thread having the same issue at this link: weird artifacts when saving pie chart as pdf. No solution is provided at

Android - Pie Chart

亡梦爱人 提交于 2020-01-03 00:54:06
问题 Why my diagram pie chart is so small. I use the library mpandroidchartlibrary-2-1-2.jar and I have activity_main.xml android:id="@+id/mainLayout". Anyone have any idea what the problem can be? public class MainActivity extends Activity{ private RelativeLayout mainLayout; private PieChart mChart; DatabaseHelper datahelper = new DatabaseHelper(this); private float[] yData = {5, 10, 15, 30, 40}; private String[] xData = { "Sony", "Huawei", "LG", "Apple", "Samsung"}; @Override protected void

Easy Pie Chart : Bug percentage not centered?

喜欢而已 提交于 2020-01-02 05:23:28
问题 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 }}"><

D3.js : Removing dynamically added Pie Chart slices

我与影子孤独终老i 提交于 2020-01-01 19:51:11
问题 I am able to generate pie chart and add data to it dynamically, based on user interaction. Here is the fiddle http://jsfiddle.net/L5Q8r/ The problem I am facing is during the data removal from pie-chart. When the checkbox is unchecked, I am deleting the data from "dataset" and updating the chart. The chart is getting updated but the previous "slice of pie" is still visible to user. I tried adding the ".exit().remove()" but no success. Here is what I did: var updateChart = function (dataset) {

Pie chart background changes when slice too small in MPAndroidChart

荒凉一梦 提交于 2020-01-01 15:35:25
问题 Please help me out from this problem in pie-chart using MPAndroidChart This is a library bug. When I have a pie slice that is too small, the color for that slice bleeds into the chart background. Like in the pictures below - you can see the yellow color has bled. I'm setting static float data in setData() :- private void setData(int count, float range) { yVals1.add(new Entry(100.9f, 0)); yVals1.add(new Entry(0.01f, 1)); } It means when we enter a huge difference between 2 values then this

Update pie slice size in Raphael pie chart

99封情书 提交于 2020-01-01 12:10:52
问题 I'm working on making a pie chart that shows results over time. As such it needs to animate between states to show how different slices change. I've figured out how to change all the slices en masse (using this example as a starting point), but I would like to be able to select and manage a particular slice (or sector as Raphael calls it) at a time. Has anyone figured out how to do that? I've found that if var pie is my pie chart, then I can get a particular slice with: var pie = r.g.piechart