pie-chart

How to display pie slice data and tooltip together using chart.js

情到浓时终转凉″ 提交于 2019-12-26 05:38:02
问题 Can we display data in pie chart slice and also tolltip like the above image using chart.js? Updated: Here is my code in php page. printf( '<table>' ); echo '<tr><td style="text-align: right;"><canvas id="pie-canvas-' . $canvasId . '" width=256px height=257px ></canvas></td><td style="text-align: left;width:360px;" id="legend" class="chart-legend"></td></tr>'; echo '<script type="text/javascript">drawPie(' . $canvasId . ', ' . $data .', ' . $legend . ');</script>'; printf( '</table>' );

jQuery flot pie resize

泪湿孤枕 提交于 2019-12-25 19:04:33
问题 I have got the resize thing working but when i use the pie chart at first everyting is oke but when i resize the container i get a big sqaure chart instead of the round pie. How is this possible to fix? The JS code: $("table.chart-pie").each(function() { var colors = []; $("table.chart-pie thead th:not(:first)").each(function() { colors.push($(this).css("color")); }); $(this).graphTable({ series: 'columns', position: 'replace', width : '100%', height: '250px', colors: colors }, { series: {

How can I add labels onto the pie pieces that are large enough to contain them, and alongside those that aren't?

ε祈祈猫儿з 提交于 2019-12-25 19:01:57
问题 I've got simple bogus data that generates this Excel Chart: This is the code: object misValue = System.Reflection.Missing.Value; //add data _xlSheet.Cells[11, 11] = ""; _xlSheet.Cells[11, 12] = "Student1"; _xlSheet.Cells[11, 13] = "Student2"; _xlSheet.Cells[11, 14] = "Student3"; _xlSheet.Cells[12, 11] = "Term1"; _xlSheet.Cells[12, 12] = "80"; _xlSheet.Cells[12, 13] = "65"; _xlSheet.Cells[12, 14] = "45"; _xlSheet.Cells[13, 11] = "Term2"; _xlSheet.Cells[13, 12] = "78"; _xlSheet.Cells[13, 13] =

Anychart : How to add animation in Pie or funnel chart of AnyChart7.1

谁说胖子不能爱 提交于 2019-12-25 07:18:40
问题 I am using latest version of anychart. They provide the animation features using chart.animation(true) This feature working fine for line chart and other charts like column but this does not work with many charts. So how can i add the animation for pie and funnel charts. 回答1: Animation issue is fixed in release 7.12.0 Please, take a look at Pie Chart sample chart.animation(true, 800); Funnel Chart sample chart.animation(true, 800); Pyramid Chart sample chart.animation(true, 800); 回答2: Right

How can Implenent a Pie Chart using jFreechart in jsp? [duplicate]

六月ゝ 毕业季﹏ 提交于 2019-12-25 05:25:27
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: How can i display pie chart in jsp page? <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@ page import="java.awt.*"%> <%@ page import="java.io.*"%> <%@ page import="org.jfree.chart.*"%> <%@ page import="org.jfree.chart.entity.*"%> <%@ page import="org.jfree.data.general.*"%> <% DefaultPieDataset

Highcharts Donutchart: Avoid showing duplicate legend with nested charts

一曲冷凌霜 提交于 2019-12-25 04:52:13
问题 I am trying to represent nested data using Highcharts Donut Chart. The charts are generated quite well, however I am having some problems with displaying the legend. Data to be represented: Category A -[High : 20%, | Medium : 50% | Low : 30%] Category B -[High : 10% | Medium : 50% | Low : 40%] JS Fiddle : http://jsfiddle.net/a2sy9bgj/ $(function () { // Build the data arrays var categoryData = [{ name: 'Category A', y : 60, color: 'white', borderColor : 'black' }, { name: 'Category B', y : 40

Highcharts Donutchart: Avoid showing duplicate legend with nested charts

别来无恙 提交于 2019-12-25 04:51:04
问题 I am trying to represent nested data using Highcharts Donut Chart. The charts are generated quite well, however I am having some problems with displaying the legend. Data to be represented: Category A -[High : 20%, | Medium : 50% | Low : 30%] Category B -[High : 10% | Medium : 50% | Low : 40%] JS Fiddle : http://jsfiddle.net/a2sy9bgj/ $(function () { // Build the data arrays var categoryData = [{ name: 'Category A', y : 60, color: 'white', borderColor : 'black' }, { name: 'Category B', y : 40

MPAndroidChart: negative values in pie chart or custom labels

断了今生、忘了曾经 提交于 2019-12-25 04:33:26
问题 In my Android application I have to show my income and expense amounts in a piechart. The expense amounts will be negative. The amounts are of type float . So is it possible to display both negative and positive values in a pie chart using MPAndroidChart library? I have tried with some negative and positive integer values and the result is horible. The pie-chart will behave crazy like a rummy board or illumination screen. If I can't have negative values in a pie chart, is it possible to show

Read the values from the print statement array to create a pie-chart

纵饮孤独 提交于 2019-12-25 04:27:55
问题 Here is the code: import matplotlib.pyplot as plt students = [6,3,1,8,2] a=[] for s in students: a.append((s/20)*100) values =[] for b in a: values.append(b) print(values) # Want to grab values directly from the "print(values)" instead of copying them from the output. values = [30, 15, 5 , 40, 10] colors = ['yellowgreen', 'gold', 'lightskyblue', 'lightcoral', 'red'] plt.pie(values, labels=[6,3,1,8,2], colors=colors, autopct='%1.1f%%', shadow=True, startangle=90) As shown in both "for loops",

manage text in some Situation PieChart of MPAndroidChart

眉间皱痕 提交于 2019-12-25 03:12:09
问题 I try to manage text in PieChart of MPAndroidChart. But when my text is difficult situation like True = 2, False = 3 , Not = 95, in this situation my pie chart layout is very bad. Here is my code :- fun setupPieChartView() { mPie = findViewById(R.id.piechart) mPie?.setUsePercentValues(true) val desc: Description = Description() desc.text = "PieChart" mPie?.description = desc val legend: Legend? = mPie?.legend legend?.horizontalAlignment = Legend.LegendHorizontalAlignment.LEFT val value =