charts

Setting a dynamic size for an Asp:Chart control

一世执手 提交于 2020-01-04 04:35:09
问题 I am trying to make my chart width and height dynamic but I can't get it to work. So far what I've tried: I've set the Chart inside an Asp:Panel and given the panel the desired percentual values. <asp:Panel ID="Panel1" runat="server" Width="90%" Height="40%"> <asp:Chart ID="Chart1" runat="server" CssClass="chart"> <Series> <asp:Series Name="Series1"></asp:Series> </Series> <ChartAreas> <asp:ChartArea Name="ChartArea1"></asp:ChartArea> </ChartAreas> </asp:Chart> </asp:Panel> Then I try to

D3 - adding grid to simple line chart

*爱你&永不变心* 提交于 2020-01-04 04:34:44
问题 In the following simple line chart, I want to add grid to x and y axis. Can someone help me in that? SNIPPET: <html> <head> <script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.12/angular.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/d3/4.3.0/d3.min.js"></script> </head> <body ng-app="myApp" ng-controller="myCtrl"> <svg></svg> <script> //module declaration var app =

dynamic binding of chart from database in VS2010 in C#

▼魔方 西西 提交于 2020-01-04 04:08:29
问题 I have to create charts with dynamic datasource, I have a code. It does not show error but the graph is also not visible on runtime. Here out_table is the name of my table and ADX is one of its column. code: OleDbConnection con1 = new OleDbConnection(@"PROVIDER=Microsoft.ACE.OLEDB.12.0;DATA SOURCE=RS.accdb"); String sqlo = "Select ADX from " + out_table + ""; OleDbCommand myCommand = new OleDbCommand(sqlo, con1); myCommand.Connection.Open(); OleDbDataReader myreader = myCommand.ExecuteReader

How can I change color of only one column in Barchart using Chart.js

情到浓时终转凉″ 提交于 2020-01-04 03:56:28
问题 js http://www.chartjs.org/docs/#bar-chart I am using the basic sample: HTML <canvas id="canvas" height="450" width="600"></canvas> JS var data = { labels: ["January", "February", "March", "April", "May", "June", "July"], datasets: [ { label: "My First dataset", fillColor: "rgba(220,220,220,0.5)", strokeColor: "rgba(220,220,220,0.8)", highlightFill: "rgba(220,220,220,0.75)", highlightStroke: "rgba(220,220,220,1)", data: [65, 59, 80, 81, 56, 55, 40] } ] }; window.onload = function(){ var ctx =

flot charts - externally selecting bars

孤者浪人 提交于 2020-01-04 03:18:19
问题 I'm using flot http://code.google.com/p/flot/ and would like to highlight a particular bar in the series when the user hovers over a link, does anyone know how to do that? Cheers, Tim 回答1: The thing you're looking for is highlight , which is documented in the API.txt: highlight(series, datapoint) Highlight a specific datapoint in the data series. You can either specify the actual objects, e.g. if you got them from a "plotclick" event, or you can specify the indices, e.g. highlight(1, 3) to

Silverlight/WPF charting toolkit. Can I change frequency of tick marks on CategoryAxis?

情到浓时终转凉″ 提交于 2020-01-04 02:09:27
问题 There is Interval property on LinearAxis but none on CategoryAxis. I need to control frequency of tick marks on X axis. The native logic does so many marks that I cant read even if I stretch the chart across 3 wide monitors!! 回答1: A couple of suggestions... 1.) CategoryAxis has a AxisLabelStyle property which you can use to set in a Style with a smaller FontSize, or a more condensed FontFamily 2.) CategoryAxis also has MajorTickMarkStyle which you can use to set the Line Stroke brush or

How to apply ShapeStyle to a specific Series of a Chart in Excel using VBA?

痴心易碎 提交于 2020-01-04 01:57:08
问题 How do I programatically apply a ShapeStyle to a set of Points from a single Series of a Chart using vba? It seems I need a "Shapes" object that contains only the points from the series I am trying to format? Some information is here: http://peltiertech.com/WordPress/programming-excel-2007-2010-autoshapes-with-vba/ under the "Setting Border and Fill Styles" section I have pseudocode but I have no idea how to create the Shapes object with only the items I want in it ' Applies desired

Multiple Range Highlighting of Background in Chart.js

眉间皱痕 提交于 2020-01-03 18:59:32
问题 From this question I'm looking to turn into a multiple range highlight But there 1 annoying bug I didn't success to solve background are superposing, if you uncheck a dataset on the top, alpha change Here my work so far: https://jsfiddle.net/742zut83/588/ Why is custom draw function executed for each dataset? One highlights done originalLineDraw is returned draw : function() { var chart = this.chart; // Get the object that determines the region to highlight. var yHighlightRanges = chart

Recharts custom label

a 夏天 提交于 2020-01-03 16:47:35
问题 Custom label for React Recharts not working with Bar chart. http://jsfiddle.net/xpko4e7e/ <Bar dataKey="pv" fill="#8884d8" label={<CustomLabel/>} /> Expected to see the 'Label' text over of all bars. 回答1: instead of returning a div try returning a text SVG element const CustomizedLabel = React.createClass({ render () { const {x, y, stroke, value} = this.props; return <text x={x} y={y} dy={-4} fill={stroke} fontSize={10} textAnchor="middle">{value}</text> } }); and then add <Bar dataKey="pv"

Logarithmic scale in material google line chart

a 夏天 提交于 2020-01-03 13:59:25
问题 I am not able to create a logarithmic vertical axis for my material Google Line Chart. Documentation states that I should set vAxis.logScale to true in the options, but this leads to no result. Currently my test reads: <div class="chart"></div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> <script src="https://www.gstatic.com/charts/loader.js"></script> <script> google.charts.load("current", { "packages": [ "line", "corechart" ]}); google.charts