linechart

d3 js - update transition with multiple lines

无人久伴 提交于 2019-12-25 01:49:42
问题 Almost got it - the y-axis and the two paths update as they should. The text value dosen't and part of the problem is the selection, i select the wrong way. And then it doesn't adhere to the changes in y but instead goes galloping off. Code that almost work: // First transition the line & label to the new city. var t0 = level.data(dsMainArr).transition().duration(750); t0.selectAll(".line") .attr("d", function(d) { return line(d.values); }) .style("stroke", function(d) { return color(d.name);

Morris line chart

倾然丶 夕夏残阳落幕 提交于 2019-12-25 01:22:07
问题 i am using morris line chart in my application, Here everything is complete but on x axis i wrote 1 then it display 1910 but i want there current month and date not year. means i want date in place of list of year. Here is my code: Morris.Line({ element: 'line-example', data: [ { time: '1', a: 0, b: 0 }, { time: '2', a: 0, b: 0 }, { time: '3', a: 0, b: 0 }, { time: '4', a: 0, b: 0 }, { time: '5', a: 0, b: 0 }, { time: '6', a: 0, b: 0 }, { time: '7', a: 0, b: 0 }, { time: '8', a: 0, b: 0 }, {

D3.js - line graph is not displayed

二次信任 提交于 2019-12-24 19:23:33
问题 I have modified some code available on the internet to draw a line chart based on the data contained in the array "data". <!doctype html> <html> <head> <title></title> </head> <body> <style> .chart-line { fill: none; stroke : #0ff; shape-rendering: crispEdges; } </style> <script src="https://d3js.org/d3.v4.min.js"> </script> <script> var svg = d3.select("svg"), margin = { top: 20, right: 20, bottom: 30, left: 50 }, width = +svg.attr("width") - margin.left - margin.right, height = +svg.attr(

Jfree chart change Y axis data

怎甘沉沦 提交于 2019-12-24 17:29:57
问题 I am using Jfree chart 0.9.20's XYLineChartDemo for plotting the execution time of running processes in a program. My X axis denotes the time and Y axis should denote the Pid. How can I edit the Jfreechart files to make my Y axis to denote values I want and not numbers 0-range?? Also is there a way to make the line plotted to be made thicker in width? 回答1: study this: public JFreeChart createChart(String axisX, String axisY){ JFreeChart chart = ChartFactory.createTimeSeriesChart(null, axisX,

Multiple Line Chart, don't want to plot 0 values. Swift 2

最后都变了- 提交于 2019-12-24 17:11:14
问题 I am generating a multiple line chart using ios-charts library. (danielgindi/Charts). I am creating an array to for the x-axsis which is retrieved from Core Data and if there is no value for x week, i appended a 0. I have an example array of (for the x values): [[0.0,0.0,5.6,3.0,6.0,5.4,2.1,0.0,0.0,1.3,4.1,0.0],[5.2,0.0,3.2,7.0,8.9,0.0,5.0,0.0,4.6,0.0,0.0,0.0],[3.6,1.5,3.6,0.0,0.0,3.5,0.0,4.6,5.6,2.8,8.4,0.0]] and for the y: [Jan,Feb,March,April,May,June,July,August,Sept,Oct,Nov,Dec] I have

D3 Getting values from keys using array of objects

此生再无相见时 提交于 2019-12-24 15:35:45
问题 So I read in a csv file on Country GDP, and I filtered out unwanted columns and countries. Now I want to know how to extract the values from this array of objects and use them to create x and y axes for a multi-series line chart. Here is my code function country(element) { return element.CountryName == "Brazil" || element.CountryName == "China" || element.CountryName == "Russian Federation" || element.CountryName == "United Kingdom" || element.CountryName == "United States" || element

JavaFx 2.x: How to draw minor grid lines

拈花ヽ惹草 提交于 2019-12-24 13:35:14
问题 I'm unable to draw minor grid lines, it is possible to do so in JavaFx 2.2? In my case the grid and the graph moves so I cannot use a static image to generate the minor grid (live graph as shown in this example here). Currently I see this an example of what I'm looking for. 回答1: As suggested by @colti and a little bit of module logic I came up with this solution import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.chart.LineChart; import javafx.scene.chart

Highcharts - when disabled in legend, line label still appears

大兔子大兔子 提交于 2019-12-24 08:37:55
问题 I am using highcharts and made this simple line chart. When I turn off the view for a person on the legend the name still appears as a line label on the line chart. Any way I can turn that off? I attached a picture of the problem. I want only Wilson to show. This is my code: Highcharts.chart('chart1', { chart: { type: 'line' }, title: { text: 'Hours vs Month (' + months[0] + "-" + months[5] + ")" }, xAxis: { categories: months }, yAxis: { title: { text: 'Hours' } }, tooltip: { valueSuffix: '

C# Line Chart How to Create Vertical Line

空扰寡人 提交于 2019-12-24 02:35:13
问题 I have a line chart. For example like this; I want to draw a vertical line that have a label at the bottom of it. And i want that label move through x points of chart with its vertical line when i drag it above those x points. I will get the y points where that line with label matches Y axis For example; How can i do this? 回答1: This solution lets you drag the Annotation line left and right and updates the X- and Y-values in a (right aligned) title field. Update: I have corrected a few things

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