chart

NVD3.js Get Data Point's Screen Position Within SVG Chart

匿名 (未验证) 提交于 2019-12-03 02:27:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm using the nvd3.js line with focus chart ( view finder ) model for a project. There are customizations that i need to add to this example -- such as different types of annotation overlays on top of the graph. There's a couple ways i can see tackling this: 1. I could extend the nvd3 chart models to create one that does what i need ( that seems like a lot of work at the moment ) 2. I can find the right interfaces in the existing nvd3 chart models and write my own d3 stuff to create annotations ( this seemed easier, and so i went down this

Chart JS Show HTML in Tooltip

匿名 (未验证) 提交于 2019-12-03 02:26:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've been fighting with Chart JS's documentation trying to figure out how to modify the content of a line chart's tool tip when you hover over a specific point. Basically, I want to display the values on all the same vertical axis whenever a single point is hovered over. I've tried something like this: tooltips: { callbacks: { label: function(tooltipItem, data){ console.log(data); var html = ""; for(var dataset in data.datasets){ html += "<label>" + data.datasets[dataset].label + ": " + data.datasets[dataset].data[tooltipItem.index] + "%<

ASP.NET Charting Control no longer working with .NET 4

匿名 (未验证) 提交于 2019-12-03 02:24:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I've just upgraded to .NET 4 and my ASP.NET Chart Control no longer displays. For .NET 3.5, the HTML produced by the control used to look like this: <img id = "20_Chart" src = "/ChartImg.axd?i=chart_5f6a8fd179a246a5a0f4f44fcd7d5e03_0.png&g=16eb7881335e47dcba16fdfd8339ba1a" alt = "" style = " height : 300px ; width : 300px ; border - width : 0px ; " /> and now, for .NET 4, it looks like this (note the change in the source path): <img id = "20_Chart" src = "/Statistics/Summary/ChartImg.axd?i=chart_5f6a8fd179a246a5a0f4f44fcd7d5e03_0

MPAndroidChart - First and last bars not rendering correctly

匿名 (未验证) 提交于 2019-12-03 02:24:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: In the bar chart I am creating the first and last rows are consistently being cut in half (even if I add additional bars). This also causes the values above the bars to be out of place. I am inflating this within a fragment. The axis are also only increasing by 0.9 instead of 1. To fix this do I need to implement the AxisValueFormatter interface? Image: Code: .java chart = (BarChart) view.findViewById(R.id.chart1); // Chart settings chart.setDrawGridBackground(false); chart.setHighlightFullBarEnabled(true); chart.setDrawBarShadow(false);

matplotlib: Controlling pie chart font color, line width

匿名 (未验证) 提交于 2019-12-03 02:24:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm using some simple matplotlib functions to draw a pie chart: f = figure(...) pie(fracs, explode=explode, ...) 回答1: Global default colors, line widths, sizes etc, can be adjusted with the rcParams dictionary: import matplotlib matplotlib . rcParams [ 'text.color' ] = 'r' matplotlib . rcParams [ 'lines.linewidth' ] = 2 A complete list of params can be found here. You could also adjust the line width after you draw your pie chart: from matplotlib import pyplot as plt fig = plt . figure ( figsize =( 8 , 8 )) pieWedgesCollection =

Microsoft chart stacked column chart has gaps

匿名 (未验证) 提交于 2019-12-03 02:20:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm using the Chart library in .Net 4.0 to create a stacked column chart with several series. My goal is a histogram that shows the cumulative number of actions (report completions) per day across several series (teachers). There is often missing data (no activity that day by a particular teacher). I get gaps in the bars when there is missing data in a series: My code: public ActionResult CompletionHistogram(int sid, int width, int height) { Site site = SiteRepository.Get(sid); if (site == null) return new HttpNotFoundResult(); Chart chart =

ChartJs line chart repaint glitch while hovering over

匿名 (未验证) 提交于 2019-12-03 02:20:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have the following code leveraging the ChartJS library. /*assume the tags in the right place */ <canvas id="graph1" width="300" height="300"></canvas> var ctx = $("#graph1").get(0).getContext("2d"); var myChart = new Chart(ctx).Line(graph1Generator("day")); ... everything works fine, but after adding the following event handler to clear and repaint the same chart with different data, a glitch occurs. weekButton.addEventListener("click", function(){ ctx.clearRect (0, 0, 300, 300); ctx.canvas.width = 300; ctx.canvas.height = 300; myChart =

JavaScript Chart Library

匿名 (未验证) 提交于 2019-12-03 02:20:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Would anyone recommend a particular JavaScript charting library - specifically one that doesn't use flash at all? 回答1: There is a growing number of Open Source and commercial solutions for pure JavaScript charting that do not require Flash. In this response I will only present Open Source options. There are 2 main classes of JavaScript solutions for graphics that do not require Flash: Canvas-based, rendered in IE using ExplorerCanvas that in turns relies on VML SVG on standard-based browsers, rendered as VML in IE There are pros and cons of

Uncaught TypeError: Cannot read property &#039;offsetWidth&#039; of undefined - chart.js

匿名 (未验证) 提交于 2019-12-03 02:20:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have this simple html: <canvas id="myChart" width="400" height="400"></canvas> and this js: var ctx = document.getElementById("myChart"); var myChart = new Chart(ctx, { type: 'bar', data: { labels: ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"], datasets: [{ label: '# of Votes', data: [12, 19, 3, 5, 2, 3], backgroundColor: [ 'rgba(255, 99, 132, 0.2)', 'rgba(54, 162, 235, 0.2)', 'rgba(255, 206, 86, 0.2)', 'rgba(75, 192, 192, 0.2)', 'rgba(153, 102, 255, 0.2)', 'rgba(255, 159, 64, 0.2)' ], borderColor: [ 'rgba(255,99,132,1)', 'rgba(54

Create a 100 % stacked area chart with matplotlib

匿名 (未验证) 提交于 2019-12-03 02:20:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I was wondering how to create a 100 % stacked area chart in matplotlib. At the matplotlib page I couldn't find an example for it. Somebody here can show me how to achieve that? 回答1: A simple way to achieve this is to make sure that for every x-value, the y-values sum to 100. I assume that you have the y-values organized in an array as in the example below, i.e. y = np.array([[17, 19, 5, 16, 22, 20, 9, 31, 39, 8], [46, 18, 37, 27, 29, 6, 5, 23, 22, 5], [15, 46, 33, 36, 11, 13, 39, 17, 49, 17]]) To make sure the column totals are 100, you have