charts

How To Create A Line Chart From Array Of Values?

自古美人都是妖i 提交于 2019-12-11 10:33:14
问题 i want to add line with values on chart how do this my array value {10,20,30.....} 回答1: This will bind all your data from the array to the chart in only one line of code: chart1.Series[0].Points.DataBindY(insertYourArrayHere); 来源: https://stackoverflow.com/questions/33828236/how-to-create-a-line-chart-from-array-of-values

Chart in winform displaying wrong Point

人走茶凉 提交于 2019-12-11 10:30:04
问题 I have the following code. I have hardcoded the x and y values to test. And for some reason for the point (0,-0.5) it plots (1,-0.5) For the life of me I do not know what is going on, because if you try other values then the graph displays correctly. foreach (var grp in q) { point = new DataPoint(); Sum1 = grp.Sum1 > 2 ? 2 : grp.Sum1; Sum1 = Sum1 < -2 ? -2 : Sum1; Sum2 = grp.Sum2 > 2 ? 2 : grp.Sum2; Sum2 = Sum2 < -2 ? -2 : Sum2; point.XValue = 0; point.YValues = new double[] { -0.5 }; chart1

Google Chart BarChart onmouseover

旧时模样 提交于 2019-12-11 10:19:18
问题 I am trying to add an listener on a "onmouseover" event on a Google BarChart, but cannot get it to work. I want to use the "mouseover"-element to make a ajax call...(a snippet of my code): dataTable = google.visualization.arrayToDataTable(dataRaw, false); var chart = new google.visualization.BarChart(document.getElementById("successChart")); //Setting options for the chart var options = {}....; chart.draw(dataTable, options); // Add actionlistener google.visualization.events.addListener(chart

Specifying a width and height of 100% generates JavaScript errors

萝らか妹 提交于 2019-12-11 09:49:32
问题 I am attempting to render a Google bar chart. In my JavaScript, I have the following: var options = { width: '100%', height: '100%', chartArea: { height: '100%', width: '100%', left: 85, top: 10, bottom: 60, right: 25 }, legend: { position: 'bottom', alignment: 'start' }, annotations: { alwaysOutside: true}, hAxis: { gridlines: { count: 10 }, }, }; When I execute this, I get the following JavaScript errors: However, if I change the height from '100%' to '400' as shown below, the chart renders

How to format series labels of a BIRT chart by script

孤人 提交于 2019-12-11 09:39:47
问题 I have a chart report displaying indicator values over time. This indicator is a report parameter and can represent either a percent (%) or a currency ($) value. Here is an example with a percent type: Now i need to change the format number of datapoint labels depending on the type of the selected indicator. In BIRT designer i defined percent format by default: The indicator type is extracted from a dataset and stored in a persistent global var, so that it can be accessed in chart scripts. In

Avoid duplicate dates in d3js axes

a 夏天 提交于 2019-12-11 09:36:21
问题 I have many charts being generated dynamically. For some charts, the dates are near each other, so, axis labels are getting repeated Example: Date format used: d3.time.format("%d-%b-%y") Is there an in-built way to avoid duplication of labels? Or is there a good generic procedure which can avoid such duplication? Note that my charts have zooming feature also and the incoming data is dynamic, so I can't put in hardcoded values of "ticks" or "tickValues". Generating ticks or tickValues

C# mouse click events on datapoints in a chart

会有一股神秘感。 提交于 2019-12-11 09:27:41
问题 I want to create a chart and i am using the charts from the toolbox in Visual studio 2010. This is the first time i am trying to do this and so far i have learned the basics of the chart like how to create datapoints and add them to the series in order to get the chart. What i wanted to know is that if its possible to make the datapoints visible to the user (like the dots in a point chart) and the user to be able to click on a datapoint and get a specific result. What i was thinking is that

MPANDROIDCHART: How to draw X label with .setViewPortOffsets(0,0,0,0)

假如想象 提交于 2019-12-11 09:23:20
问题 I have a problem with draw X label when my chart has been set setViewPortOffsets on 0, 0, 0, 0. I know what setViewPortOffsets do, But I don't know how to set it to make only the margins disappear on left and right side. Can someone help me please? PS: Sorry for my bad English. 回答1: Add following lines to remove axis lines from both sides of chart: chartView.getAxisLeft().setEnabled(false); chartView.getAxisRight().setEnabled(false); 来源: https://stackoverflow.com/questions/47780961

amCharts pie - how to get slice to pull out on rollOverSlice?

好久不见. 提交于 2019-12-11 09:16:54
问题 I am having a lot of difficulties navigating through amCharts Docs and I cant seem to find the answer to this online. I am using the amCharts pie chart, and I want a couple of thing to happen when the mouse rolls over a slice, one of those things is to get the slice to pull out what happens when you click a slide in this demo. This is what I tried according to the doc, but doesn't seem to work: var pieChartData = [ { asset: 'Funiture', marketValue: 50000.00 }, { asset: 'Cash', marketValue:

Adding a TextBlock (or label) on the end of a LineSeries DataPoint of a DataVisualizationChart

旧时模样 提交于 2019-12-11 09:16:46
问题 I'm creating a User Control componente of type DataVisualization.Chart. Right now, he accepts 4 range limits (1 range minimum of accept value and 1 maximum, also 1 range minimum of warning value and 1 maximum warning range value). So far, so good. It works. But i need to add a TextBlock (or label, or TextBox, whatever) at the end of the LineSeries. This is my actual LineSeries: Now i need to make something like this: Even if the result is not the same, i need to put a label or textblock at