charts

D3.js error using timescale (path is NaN)

霸气de小男生 提交于 2020-01-06 05:34:05
问题 Im using d3.js to make a heatmap. My data is an object out of which i have pulled out the maximum and minimum year. When i use d3.timeScale() to initialise my x axis, im getting an error with all my years rendering on the same position of x ( this is due to the following errors on the console) d3.min.js:2 Error: <path> attribute d: Expected number, "MNaN,6V0.5HNaNV6". (anonymous) @ d3.min.js:2 13d3.min.js:2 Error: <g> attribute transform: Expected number, "translate(NaN,0)". Some of the code

Pie Chart Custom Legend

故事扮演 提交于 2020-01-06 04:43:07
问题 I am using highcharts to build a Pie chart, I am hiding the default legend that comes with highcharts and making my own. I am able to build one for line graphs, but when I do it for a pie chart, I can not get show()/hide() methods of the data to work because they are all in the same series. How can I get show()/hide() to work on a pie chart? var chart = $('#chartdiv').highcharts(); $(".legend div").html(""); $(chart.series).each(function(seriesKey, series){ $(series.data).each(function(k, v){

VBA run-time error “7” when naming xlXY ScatterLines chart

前提是你 提交于 2020-01-06 03:15:31
问题 I'm running a code that requires me to name a chart so I can refer back to it later. The code I use for this is: Sheets("Summary").Activate ActiveSheet.Shapes.AddChart.Select ActiveChart.ChartType = xlXYScatterLines With ActiveChart .Name = "energy distribution chart" End With I've tried just naming the chart not using the with... as in: ActiveChart.Name = "energy distribution chart" Doesn't work also. Whenever the code runs at that line I get a "run-time error 7 - Out of memory". I've tried

How do I create a legend for a bar chart?

南笙酒味 提交于 2020-01-06 03:15:05
问题 How do I create legends like the following: So far I have the following: I can't figure out how to specify labels for the legend. They don't provide examples either. https://www.chartjs.org/docs/latest/configuration/legend.html So far I have the following code: var topClickSourcesChart = new Chart('dashboard-click-source-chart', { type: 'bar', data: { labels: ["Facebook","Google","NONE",], datasets: [{ data: [10,5,3,], backgroundColor: ['#4D90C3', '#866DB2', '#EA6F98', '#61BDF6', '#768BB7'],

Add Legend to Donut Chart - jqPlot

最后都变了- 提交于 2020-01-06 03:13:07
问题 OK, this should be relatively simple : I'm adding a donut chart, which does work However, the 'legend' (like Head (+) along with the corresponding colour) does NOT show up. Code : $(document).ready(function(){ var s1 = [['Head (+)',<?php echo $headScore; ?>], ['Head (-)',<?php echo 6-$headScore; ?>]]; var s2 = [['Body (+)',<?php echo $totalScore-$headScore; ?>], ['Body (-)',<?php echo 7-$totalScore+$headScore; ?>]]; var plot3 = $.jqplot('linkchart', [s1,s2], { title:"Score Profile",

Turn a stacked column google chart into a waterfall chart

六月ゝ 毕业季﹏ 提交于 2020-01-06 02:33:20
问题 I've been working on a project to replicate a waterfall chart with the use of google charts. I've managed to have 2 series of stacked columns where the first series is transparent so the second visible series seem to be floating, just as a waterfall chart would look like. The problem is that the first transparent series remains interactive and highlights on a mouse hover, with labels and annotations showing up. Can you help me figure out how to stop the first column series being detected. I

Google LineChart: issue with line graph combine 3 data array in one chart possible?

与世无争的帅哥 提交于 2020-01-06 02:24:45
问题 i need graph look like this way below x axis product name 1 X axis : date 2. y axis : cost 3. line points should be a product name google.charts.load('current', { packages: ['corechart'] }).then(function () { var charts = {}; var options = { Column: { chartArea: { height: '100%', width: '100%', top: 24, left: 64, right: 32, bottom: 48, }, tooltip: { valueDecimals: 2, valueSuffix: ' USD', valuePrefix: '$' }, 'vAxis': { title: 'Cost in USD ($)', format:'$#', }, height: '100%', legend: {

Google LineChart: issue with line graph combine 3 data array in one chart possible?

蓝咒 提交于 2020-01-06 02:24:29
问题 i need graph look like this way below x axis product name 1 X axis : date 2. y axis : cost 3. line points should be a product name google.charts.load('current', { packages: ['corechart'] }).then(function () { var charts = {}; var options = { Column: { chartArea: { height: '100%', width: '100%', top: 24, left: 64, right: 32, bottom: 48, }, tooltip: { valueDecimals: 2, valueSuffix: ' USD', valuePrefix: '$' }, 'vAxis': { title: 'Cost in USD ($)', format:'$#', }, height: '100%', legend: {

how to add data in google charts using javascript ?

China☆狼群 提交于 2020-01-05 11:09:15
问题 I am using Google Charts for my website and parse.com for server-side. I have one tag <div id="chart_div"> </div> which draws the chart. For Chart this is Javascript part : $( document ).ready(function() { var currentUser = Parse.User.current(); console.log( currentUser ); var stepcount = Parse.Object.extend("stepCount"); var query = new Parse.Query(stepcount); query.equalTo("user", currentUser); query.find({ success: function(results) { for (var i = 0; i < results.length; i++) { var object =

Controlling ticks and odd text in a pie chart generated from a factor variable in ggplot2

流过昼夜 提交于 2020-01-05 10:08:13
问题 I'm generating a simple pie chart with use of the code below: data(mtcars) mtcars$fac_var <- as.factor(mtcars$cyl) require(ggplot2); require(ggthemes) # Chart pie_test <- ggplot(mtcars, aes(x = factor(1), fill = fac_var)) + geom_bar(width = 1) + coord_polar(theta = "y") + ggtitle("Title") + theme_pander() + scale_fill_tableau(name = "Something") + theme(axis.title = element_blank()) The code produces the following chart: I'm interested in introducing two minor modifications to the chart above