pie-chart

Placing labels inside pie chart slices (Highchart)

六眼飞鱼酱① 提交于 2019-12-11 03:20:01
问题 Using Highchart. I am positioning the labels inside the slices using distance and it centers well on mobile, but not on tablets or desktops. As the dimensions become larger, the labels get too close to the edges. How to position labels depending on viewport dimensions? plotOptions: { pie: { allowPointSelect: true, cursor: "pointer", dataLabels: { enabled: true, format: "<strong>{point.name}</strong><br>{point.percentage:.0f}%", distance: -60, color: "white" } }, series: [ { type: "pie", data:

Plotly - Create Pie Chart with continuous color scale

笑着哭i 提交于 2019-12-11 03:07:41
问题 I'm looking to create a plotly chart where the colors of each slice another variable in the dataframe. This is pretty simple to do in ggplot2, however, I'm struggling to convert this to plotly. My sample code is here: Product <- c("Product1","Product2","Product3","Product4","Product5","Product6","Product7") Value <- c(1000000,200002,599996,1399994,2199992,2999990,3799988) Rating = c(0.24, 0.28, 0.17, 0.1, 0.5, 0.6, 0.34) df <- data.frame(Product,Value, Rating) plot_ly(df, labels = ~Product,

IE8 not supporting Google Charts (Pie Chart)

孤人 提交于 2019-12-11 03:06:25
问题 IE8 is not rendering Google Charts (Pie Charts). It is giving me an error saying : SCRIPT5: Type mismatch: jsapi, line 20 character 89 I have tried looking on the web for a solution, tried all of them, but to no use. I am debugging my application using IE Developer tool, with the following setting: Browser Mode : IE8 Document Mode: IE standards. Any suggestion would be of great help. 回答1: This seems like a problem with the emulator (and google charts) in IE9+, I am right now trying to get a

Plotting a pie-chart in matplotlib at a specific angle with the fracs on the wedges

偶尔善良 提交于 2019-12-11 02:44:07
问题 I am plotting a piechart with matplotlib using the following code: ax = axes([0.1, 0.1, 0.6, 0.6]) labels = 'Twice Daily', 'Daily', '3-4 times per week', 'Once per week','Occasionally' fracs = [20,50,10,10,10] explode=(0, 0, 0, 0,0.1) patches, texts, autotexts = ax.pie(fracs, labels=labels, explode = explode, autopct='%1.1f%%', shadow =True) proptease = fm.FontProperties() proptease.set_size('xx-small') setp(autotexts, fontproperties=proptease) setp(texts, fontproperties=proptease) rcParams[

JFreeChart - Ring Plot Simple Label Positioning

ε祈祈猫儿з 提交于 2019-12-11 02:07:23
问题 I'm having some trouble while working on JFreeChart RingPlot. I've managed to put labels inside my chart, yet I can't change their positions as I want. Here where am I right now; I need to move the labes closer to the edges of the chart so that I can lower the section depth and have a better ring look. So far, I tried to play with setSimpleLabelOffset and setLabelGap methods but didn't work well. Here is my code; DefaultPieDataset dataset = new DefaultPieDataset(); dataset.setValue("Critical"

How to add jqplot pie chart labels with lines?

梦想的初衷 提交于 2019-12-11 00:18:14
问题 I have a pie chart and I can add labels for it normal way.But I want to add labels with line as following. I took this image from web as a example. here is my code , drawPieCharts = function(dev,title,data){ $('#'+dev).empty(); var plot = $.jqplot(dev, [data], { title: { text: title, fontWeight: 'bold', fontSize : '16', show: true }, grid: { drawBorder: false, drawGridlines: false, background: '#ffffff', shadow:false, //diameter : 30 }, axesDefaults: { }, highlighter: { show: true,

Assign specific colours to data in Matplotlib pie chart

送分小仙女□ 提交于 2019-12-10 17:40:24
问题 I'm trying to create pie charts with matplotlib in which the colour of each category is fixed. I've got a function which creates a pie chart from sets of value and category data. Here's one example: Category Value TI 65 Con 43 FR 40 TraI 40 Bug 38 Data 22 Int 15 KB 12 Other 8 Dep 7 PW 6 Uns 5 Perf 4 Dep 3 The problem is that the data differs from one instance to another, and that in turn changes the order of the categories. Thus, each category gets labelled a different colour each time I

Chart js - avoid overlapping of tooltips in pie chart

孤街浪徒 提交于 2019-12-10 16:34:17
问题 I've used chart js library for make pie chart. I want to display tooltips always. I've done this. I've attached screenshot. But now the tooltips are overlapped . How to solve this? This is my code myPieChart = new Chart(pie_chart).Pie(data_results.comp.pie, { tooltipTemplate: "<%= value %> %", scaleFontSize: 14, scaleFontColor: "#333", tooltipFillColor: "rgba(0,0,0,0)", onAnimationComplete: function() { this.showTooltip(this.segments, true); }, tooltipEvents: [], tooltipFontColor: "#000", });

Matlab; Pie chart with 2+ / split legends R2017b

别来无恙 提交于 2019-12-10 16:03:32
问题 I'm creating a pie chart and ideally want the legend to be displayed horizontally at the top and/or bottom. However, in almost all cases this isn't possible as the legend go off the figure. Therefore, I'd ideally like to split the legend into two (or more) sub-legends and place them individually. I'm aware that this isn't a built-in feature in MATLAB (I'm using R2017b) but I'm not sure if it's something that can be bodged to work? I've seen a few people manage to do similar things with line

Google Pie Chart not Showing All Data Rows

邮差的信 提交于 2019-12-10 15:34:01
问题 I'm trying to plot population vs. country name and I found that the Google Visualization library is rendering only the first few (actually number is seemingly random depending on the data I use) and sometime add "Other" entry, but it doesn't actually have the value of the rest of the entries. Example 1: With all countries data Example 2: With some countries filtered out Is there an actual limit on number of rows? Why is it inconsistent? Is there a way to get around it. I know it's difficult