linechart

Chart.js does not display any data

人盡茶涼 提交于 2021-01-29 14:22:44
问题 I have a data coming from the server in the following format: [ { name: "series1" series: [ { date: "2016-01-31T00:00:00.000Z", value: 49 }, { date: "2016-02-28T00:00:00.000Z", value: 49 }, { date: "2016-03-30T00:00:00.000Z", value: 44 }, { date: "2016-04-31T00:00:00.000Z", value: 57 } ] } { name: "series2" series: [ ... ] } ] Every point in the series above represent monthly data Here is my chart declaration: this.ctx = this.myChartRef.nativeElement.getContext('2d'); let myChart = new Chart

JavaFX Adding multiple XYChart.Series to LineChart without explicating declaring each series

前提是你 提交于 2021-01-29 06:36:31
问题 I have been going through the following tutorial for creating JavaFX graphs https://docs.oracle.com/javafx/2/charts/line-chart.htm My question is, how can I dynamically create and add new series of data to my LineChart without explicating declaring each series i.e. series1, series2? When I compile and run my program only a single series has been added. Here is my code Main class that creates the LineChart and instantiate 10 different companies. public class StockChart extends Application {

Add HTML to Google Line Chart tool tip

有些话、适合烂在心里 提交于 2021-01-28 14:27:19
问题 I want to add a line on tooltip of Cats line chart. Note: My note goes here.. Now when we hover cats chart,we can see like Jan 1, 2020 Cats:10, percent: 0% Below this line I want to add the Note line (in grey color and reduced font-size than other tooltip). So the tooltip will look like: Jan 1, 2020 Cats:10, percent: 0% Note: My note goes here.. Below is my chart code: google.charts.load('current', { packages: ['corechart'] }); google.setOnLoadCallback(prepareChartData); function

JFreeChart displaying three dots (…) in place of the values on the X axis

六眼飞鱼酱① 提交于 2021-01-28 07:52:01
问题 I am trying to plot a simple line chart and almost everything is fine, I am populating my dataset with a simple code like this: DefaultCategoryDataset dataset = new DefaultCategoryDataset(); dataset.addValue(-10 , "S21" , "1000" ); dataset.addValue(-20 , "S21" , "1001" ); dataset.addValue(-25 , "S21" , "1002" ); dataset.addValue(-30 , "S21" , "1003" ); dataset.addValue(-25 , "S21" , "1004" ); ... then I create a line chart: lineChart = ChartFactory.createLineChart( "S21", "Frequency (MHz)",

Echarts: Plot the variance of signals

馋奶兔 提交于 2021-01-28 05:43:57
问题 I want to plot the variance of multiple signals in a chart (or basically fillup the space between an upper and a lower signal). Is it possible to create such kind of charts? I saw the confidence-band example (https://echarts.apache.org/examples/en/editor.html?c=confidence-band) , however this seems to work only for one signal in a chart. Another solution would be to draw thousands of small rectangles using markArea around the signals but this slows down the performance of the chart (e.g. when

How to continuously update Y-axis values in MPAndroidChart

帅比萌擦擦* 提交于 2021-01-22 08:36:53
问题 I want my axis in LineChart to adjust it's maximum and minimum values real-time. Functions like resetAxisMaxValue() and resetAxisMinValue() work well when new data's Y-value is increasing(both positive and negative), however, once the signal gets low again Y-value max and min never drops to the smaller values so it can show all new data on the full canvas of the graph. I wanted to check whether there is method to do so automatically, or whether I should use brute force. Thank you. 回答1: Alex's

How to continuously update Y-axis values in MPAndroidChart

半世苍凉 提交于 2021-01-22 08:36:08
问题 I want my axis in LineChart to adjust it's maximum and minimum values real-time. Functions like resetAxisMaxValue() and resetAxisMinValue() work well when new data's Y-value is increasing(both positive and negative), however, once the signal gets low again Y-value max and min never drops to the smaller values so it can show all new data on the full canvas of the graph. I wanted to check whether there is method to do so automatically, or whether I should use brute force. Thank you. 回答1: Alex's

Set y-axis of d3 chart to fit widest label?

老子叫甜甜 提交于 2021-01-20 19:27:21
问题 I'm drawing line charts with d3 and it all works fine. However, I have to leave enough margin on the left of the chart area to fit whatever I think might be the widest y-axis text label. I'd like to adjust this space for each chart, depending on the widest label. Initially I thought I could find the maximum y value, create a hidden text object, work out how wide that is, and use that value for the left margin when creating the chart. A bit nasty, but it gets me a value. However, if the

Set y-axis of d3 chart to fit widest label?

安稳与你 提交于 2021-01-20 19:26:57
问题 I'm drawing line charts with d3 and it all works fine. However, I have to leave enough margin on the left of the chart area to fit whatever I think might be the widest y-axis text label. I'd like to adjust this space for each chart, depending on the widest label. Initially I thought I could find the maximum y value, create a hidden text object, work out how wide that is, and use that value for the left margin when creating the chart. A bit nasty, but it gets me a value. However, if the