charts

Sorting X Axis in Chart by the dates - JavaFX

为君一笑 提交于 2019-12-23 22:23:43
问题 How to sort my LineChart X Axis by dates ? Now my LineChart looks like that I was trying to cut the dates and convert it to int, but now I don't know what to do with this... datesToCompare.addAll(LastHoursAndDates.keySet()); // dates in String eg. 2015-12-25 List<Integer> year = new ArrayList<Integer>(); // list for year after split List<Integer> month = new ArrayList<Integer>();// list for month after split List<Integer> days = new ArrayList<Integer>(); // list for days after split for(int i

One legend, multiple charts Chart JS

梦想与她 提交于 2019-12-23 22:22:05
问题 I have two pie charts with different data but same labels and background colors. How can I create a standalone legend (a legend without a chart) using ChartJS so that the legend corresponds to both the pie charts at the same time? I tried creating a pie chart with the data array set to an array of 0s. However, that causes an empty pie chart to be generated, which takes up a lot of space; so that's a no go. Any help would be deeply appreciated. 来源: https://stackoverflow.com/questions/51610867

Google chart add another chart next to each other

自古美人都是妖i 提交于 2019-12-23 22:20:17
问题 I made a working chart with mysql and I want to make another chart next to my 1st chart but it does not go well. my code <?php $con = mysqli_connect('xxxx','xxxx','xxxx','xxxx'); ?> <!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <title> 1234 </title> <script type="text/javascript" src="https://www.google.com/jsapi"></script> <script type="text/javascript"> google.load("visualization", "1", {packages:["corechart"]}); google.setOnLoadCallback(drawChart); function drawChart() { var data =

Google Charts (AreaChart) how to detect zoom change

孤者浪人 提交于 2019-12-23 22:20:15
问题 I am drawing an AreaChart , with some markers on an overlay. I am using the explorer option (horizontal only) in order to let the user zoom in and out. The problem is that I can't find a way to be notified that zoom changed, in order to have a chance to update maker positions consequently. There is a chart rangechange event, but it is not fired by AreaChart. I tried detecting common onmousewheel/onwheel event, and ondragstart/ondragend events, but: 1) onmousewheel/onwheel is fired before the

Iterating over json object for drawing a column chart?

試著忘記壹切 提交于 2019-12-23 22:02:32
问题 I use, google.load('visualization', '1', {'packages': ['columnchart']}); //google.setOnLoadCallback(drawChart); function drawChart(response) { alert(response.customerlist); var data = new google.visualization.DataTable(); data.addColumn('string', 'dbZipcode'); data.addColumn('string', 'countusers'); data.addRows(response.customerlist.length); for (var i = 0; i < response.customerlist.length; i++) { data.setValue(i, 0, response.customerlist[i].dbZipcode); data.setValue(i, 1, response

How to dynamically change axis from linear to logarithmic in HighChart

好久不见. 提交于 2019-12-23 21:47:47
问题 I want to dynamically change axis from linear to logarithmic and vice versa in HighCharts. Please see this fiddle example. yAxis: { //linear type: 'logarithmic', minorTickInterval: 0.1 }, There is a type: String in api For initial declarative chart setup. I want to dynamically change to logarithmic/linear back and forth. 回答1: Use axis.update , see: http://jsfiddle.net/ZCecV/1/ (docs: http://api.highcharts.com/highcharts#Axis.update() ) 来源: https://stackoverflow.com/questions/16324284/how-to

Google Visualisation Line Chart - Multiple Lines

浪子不回头ぞ 提交于 2019-12-23 20:38:40
问题 I have a line chart, h-axis is date, v-axis is double. I need to display two lines: lineA: [ [2016-1-1 00:00, 1.1] [2016-2-1 00:00, 1.1] [2016-3-1 00:00, 1.1] ] lineB: [ [2016-1-1 00:00, 2.1] [2016-2-1 08:00, 2.1] [2016-3-1 00:00, 2.1] ] To display the data on the chart, I need to combine these two lines and pass the result to arrayToDataTable. combine: [ [2016-1-1 00:00, 1.1, 2.1], [2016-2-1 00:00, 1.1, null], [2016-2-1 08:00, null, 2.1], [2016-3-1 00:00, 1.1, 2.1], ] As a result of the

Center Axes in oxyplot

妖精的绣舞 提交于 2019-12-23 20:26:48
问题 I want to draw a chart like image below with oxyplot, the problem is i don't know how to draw axis (with values) at value 50. Code : var model = new PlotModel { Title = "EllipseAnnotations" }; model.Axes.Add( new LinearAxis { Position = AxisPosition.Bottom, Minimum = 20, Maximum = 80, PositionAtZeroCrossing = true, ExtraGridlines = new[] { 50.0 }, ExtraGridlineStyle = LineStyle.Dash }); model.Axes.Add(new LinearAxis { Position = AxisPosition.Left, Minimum = 20, Maximum = 80,

Automatic chart update with new data entry

孤街醉人 提交于 2019-12-23 19:34:09
问题 My chart loads data from a DataGridView. I want to automatically update my chart with new data if new values are inserted into the DataGridView. My chart is bound to table1 and table2 in my DataGridView which gets values from a DataTable. Here is a small portion of the code: Dim myData As New DataTable wcAdapter.SelectCommand = wcCommand wcAdapter.Fill(myData) - Chart1.DataSource = myData Chart1.Series("Series1").ValueMemberX = "table1" Chart1.Series("Series1").ValueMembersY = "table2" Here

WinForms Chart: Set minimum Y Axis display range

為{幸葍}努か 提交于 2019-12-23 19:14:03
问题 I have a Winforms chart in which I have temperature readings arriving and displaying every second. I like the way the chart works automatically handling the display of the values, but I want to change one simple thing . I want to increase the minimum displayed y axis range, so it displays a range of 20. At the moment it only displays around 5. I have tried a few things: //(when new data arrives...) //Does not work, I think because by default, Size is always NaN? if (chart1.ChartAreas[0].AxisY