charts

Google Charts - full html in tooltips

不羁的心 提交于 2019-12-18 19:03:48
问题 I am trying to make Google Charts Display custom tooltips with full HTML in them. I know how to enable tooltips and pass appropriate data - the problem is - even when allowHTML option is enabled, the tooltips are rendered as plain text, so for example I can't show a picture in the tooltip. Here is a little example of what I am going for: What I have now: What I want: One way to solve this problem is to disable tooltips, capture onmouseover events and use another library (like cluetip) to

dc.js/crossfilter -> How to sort data in dc.js chart (like row) - Ascending x Descending

只愿长相守 提交于 2019-12-18 18:39:35
问题 How to sort data in dc.js chart (like row) - Ascending x Descending I want to reorder the chart (row/column) by specified attribute (like 'avg' -> ascending) I'm trying to use ".top()"... but unsuccessfully Thanks draft below jsfiddle -> ewr5Z/2/ 回答1: You can use the ordering method: chart.ordering(function(d){ return -d.value }) If you write a custom reduce, you can have more flexibility: priceDimension = ndx.dimension(function(d) {return d.part_number; }); priceGroup = priceDimension.group(

dc.js/crossfilter -> How to sort data in dc.js chart (like row) - Ascending x Descending

五迷三道 提交于 2019-12-18 18:39:11
问题 How to sort data in dc.js chart (like row) - Ascending x Descending I want to reorder the chart (row/column) by specified attribute (like 'avg' -> ascending) I'm trying to use ".top()"... but unsuccessfully Thanks draft below jsfiddle -> ewr5Z/2/ 回答1: You can use the ordering method: chart.ordering(function(d){ return -d.value }) If you write a custom reduce, you can have more flexibility: priceDimension = ndx.dimension(function(d) {return d.part_number; }); priceGroup = priceDimension.group(

Chart.js with dual axis on bar and line graph

一笑奈何 提交于 2019-12-18 17:14:14
问题 I am using Quince's Chart.js version from this topic Chart.js how to get Combined Bar and line charts?. Bar and Line graph look very nice. Anyway, axis has to be separated into Y1 and Y2 which i cannot find that Quince's version support. I did search again and found this topic How to add second Y-axis for Bar and Line chart in Chart.js? which recommended to use Khertan's Chart.js which it can handle dual axis but i cannot find the way to combine bar and line within one plot. I tried to input

Chart.js stacked and grouped bar chart

血红的双手。 提交于 2019-12-18 16:55:34
问题 is there any way to do a stacked and grouped bar chart with Chart.js library? It should look something like this http://www.highcharts.com/demo/column-stacked-and-grouped 回答1: You should use the stack property of the dataset object for each dataset. As you can see in Chart.js Documentation, stack is defined as: "The ID of the group to which this dataset belongs to (when stacked, each group will be a separate stack)" I believe this functionality has been introduced recently and in 2016 Chart

Chart.js stacked and grouped bar chart

▼魔方 西西 提交于 2019-12-18 16:55:26
问题 is there any way to do a stacked and grouped bar chart with Chart.js library? It should look something like this http://www.highcharts.com/demo/column-stacked-and-grouped 回答1: You should use the stack property of the dataset object for each dataset. As you can see in Chart.js Documentation, stack is defined as: "The ID of the group to which this dataset belongs to (when stacked, each group will be a separate stack)" I believe this functionality has been introduced recently and in 2016 Chart

Make a custom ring chart in JFreeChart

时间秒杀一切 提交于 2019-12-18 16:52:50
问题 I am currently using itext-pdf to generate PDFs. In addition to that, I am also using JFreeChart to create charts on it. I have created a donut chart with a explosion effect and it looks like this. However I want to create a donut chart that looks more like this. I want certain pieces to stand out but not completely get detached from the donut chart. I would highly appreciate inputs on how to achieve this. Here is my current code: import java.awt.Color; import java.awt.Graphics2D; import java

How to Draw Gantt chart using chart js or other libraries

本小妞迷上赌 提交于 2019-12-18 16:12:15
问题 I want to draw Gantt chart like below There is no option to draw Gantt chart in chart js. is it possible?? if not possible please suggest me some charting libraries to draw graph like this 回答1: I suggest you Scatter Chart . In Scatter Charts, you can draw multiple independent lines. As you can see from the below image. [ Sample Code ] var scatterChart = new Chart(ctx1, { type: 'line', data: { datasets: [ { label: 'Scatter Dataset', backgroundColor: "rgba(246,156,85,1)", borderColor: "rgba(246

nvd3 line chart, how to remove gridlines and yaxis

左心房为你撑大大i 提交于 2019-12-18 15:56:06
问题 I have made a line chart with view finder. Here is my initial code var chart = nv.models.lineWithFocusChart(); // chart.transitionDuration(500); chart.xAxis .tickFormat(d3.format(',g')); chart.xAxis .axisLabel("Date"); chart.xAxis.tickPadding(0); chart.x2Axis .tickFormat(d3.format(',g')); chart.yAxis .tickFormat(d3.format(',.2g')); chart.y2Axis .tickFormat(d3.format(',.2h')); // chart.showYAxis(false); I want to remove the y axis labels ( i.e. i want no number showing on the y axis). I also

How can I prevent overlapping in a family tree generator?

一世执手 提交于 2019-12-18 14:14:39
问题 I'm creating an interactive family tree creator, unlike more simpler versions which are simple pedigree charts/trees. The requirements for mine (based on familyecho.com) are: multiple partners vs just a simple 2 parent to 1 child that you normally see. multiple siblings partners dont necessarily need to have children there doesn't always have to be a parent "pair", there can just be a single father/mother The problem I'm encountering is: I'm generating the offsets based on the "current" node