chart

Using html2canvas to render a highcharts chart to pdf doesn't work on IE and Firefox

匿名 (未验证) 提交于 2019-12-03 08:42:37
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: We are using html2canvas.js and html2canvas.svg.js (version 0.5.0 beta1) and highcharts.js to download a donut chart into pdf. This works as expected in Chrome, however in IE and Firefox this isnt working. In IE the chart is rendered incorrectly, and in Firefox it is not rendered at all. Below are screenshots of the download in Chrome, IE and Firefox Chrome IE (Edge) Firefox The code i am using to do the html2canvas is as follows: html2canvas($("#container"), { onrendered: function (canvas) { var imgData = canvas.toDataURL( 'image/png'); var

NVD3 Line Chart Uncaught TypeError: Cannot read property 'x' of undefined

匿名 (未验证) 提交于 2019-12-03 08:41:19
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm using the NVD3 library to make simple line charts based on data generated in a Rails controller. The code I'm using to generate data in Rails is: task.task_values.each do |u| array.push({ :x => u.created_at.to_i * 1000, :y => u.value.to_i }) end data_label = task.name + " ("+ task_unit +")" taskValuesList = [{:key => data_label, :values => array}] data = {:type => "line", :data => taskValuesList} Then, in my view, I have the following JS code: nv.addGraph(function() { var chart = nv.models.lineChart() .x(function(d) { return d.x; }) .y

Google Chart veritcal axis with percentage sign

匿名 (未验证) 提交于 2019-12-03 08:36:05
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Im using google chart api to show line chart in my application, in that chart now i want to show the vertical axis values with percentage sign. for that i tried the following option chart.draw(data, {vAxis: {format:'#%'} } ); as mentioned in How do you set percentage in Google Visualization Chart API? by ' B Seven ' when using this method, the vertical axis values got multiplied by 100. i.e instead of '12%' - im getting 1200% in vaxis!!!! i have checked in https://developers.google.com documents also, i cant find any approach to do this. Is

ChartJS Line Charts - remove color underneath lines

匿名 (未验证) 提交于 2019-12-03 08:33:39
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Okay, so I have a ChartJS line chart working that populates directly from data coming for my db. What I need now is to get rid of the color underneath each of the lines. [as seen in the screenshot below]. Here's my HTML: <div ng-if="hasData"> <canvas id="line" class="chart chart-line" data="data" labels="labels" legend="true" series="series" options="options" click="onClick"></canvas> <div> Here's My JS: scope.labels = ['02:00','04:00','06:00', '08:00', '10:00', '12:00','14:00', '16:00', '18:00', '20:00', '22:00']; scope.series = series;

Limit width size of Bar chart

匿名 (未验证) 提交于 2019-12-03 08:30:34
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I created simple example of Bar Chart but I notices that size of the bar fits the chart. How I can limit the size? Foe example I would like to limit the width size. 回答1: As we already discussed here , to set a maximum width on every bar, we have to change either barGap or categoryGap accordingly, every time the scene or the chart are resized. The only difference from the refered question, is we have to resize the chart the first time is displayed. Based on the same code, let's create the setMaxBarWidth() method: private final NumberAxis

Cannot find name &#039;require&#039; after upgrading to Angular4

匿名 (未验证) 提交于 2019-12-03 08:30:34
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to use Chart.js within my Angular project. In previous Angular2 versions, I have been doing this well by using a 'chart.loader.ts' which has: export const { Chart } = require('chart.js'); Then in the component code I just import { Chart } from './chart.loader'; But after upgrading to cli 1.0.0 and Angular 4, I get the error: "Cannot find name 'require'". To reproduce the error: ng new newapp cd newapp npm install chart.js --save echo "export const { Chart } = require('chart.js');" >> src/app/chart.loader.ts ng serve In my 'tsconfig

Getting Black Image when saving a JavaFX snapshot

匿名 (未验证) 提交于 2019-12-03 08:30:34
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have set up a background Task that waits several seconds after a given Panel/Chart become visible. That is performed by running a sleep on a background non-GUI thread and then upon waking up it runs a Platform.runLater to create the snapshot and image. Before the real 'action' for saving the image occurs we can see the window come up: While that image is rendering we have the background code that has been put to sleep by a Task . After 5000 millis that background task wakes up and launches a Platform.runLater to save the scene/pane/chart

How can I draw a Radar Chart using Microsoft Chart Control for .NET Framework 3.5

匿名 (未验证) 提交于 2019-12-03 08:28:06
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: How can I draw a Radar Chart using Microsoft Chart Control for .NET Framework 3.5. I can draw "column" chart using the following code from MSDN. I could not find any example for Radar Chart. Series ChampionshipsSeries = chtNBAChampionships2 . Series [ "Championships" ]; //Add data points ChampionshipsSeries . Points . AddXY ( "Celtics" , 17 ); ChampionshipsSeries . Points . AddXY ( "Lakers" , 15 ); ChampionshipsSeries . Points . AddXY ( "Bulls" , 6 ); ChampionshipsSeries . Points . AddXY ( "Spurs" , 4 ); ChampionshipsSeries .

high-charts datalabel position needs to change when value is too small

匿名 (未验证) 提交于 2019-12-03 07:50:05
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: Data labels (in this case cash) appear in the right place, just inside the bar on the right, most of the time. However if the value of the bar is low enough, it ends up overlapping with the axis label (as shown by the purple bar). My first instinct was to set a max value and change the position of the data-label base on that. Something like, if value is less than $10 place the label outside just to the right of the bar. But there is a big problem with that approach. The size of the chart is variable and responsive, so that

Highcharts crosshair with labels on axes

匿名 (未验证) 提交于 2019-12-03 07:50:05
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Is it possible to make highcharts crosshair that vill show actual value on the axis in the separate label? Regular crosshair example out from API doesnt do this. If I set tooltip: { crosshairs: [true, true] } , it doesnt do what I need. I need chart to look like this: 回答1: It's just general idea: http://jsfiddle.net/r7fdh/ - you need to add checking if cursor is inside plot (use chart.plot[Left/Top/Width/Height] ) and you may need to use something else than event.page[X/Y] for getting position. Code: $("#container").mousemove(move); var