charts

Multiple dynamic line charts with chart.js | Js and html

回眸只為那壹抹淺笑 提交于 2021-01-28 14:04:54
问题 I'd like to create an html page using Javascript (in particular using chart.js library) and to display dynamic line charts. I'd also like to add a new chart every time the "Add Chart" button is pressed. I manage to do all of this more or less, but with some issues: when a new chart is created the old one disappears, or to better say it is blurred; I don't know how to align the new chart with the old one, recursively, so that every new chart is under the older one, I try to do so but without

Highcharts - Combine & superimpose columns

落爺英雄遲暮 提交于 2021-01-28 11:06:44
问题 I found tutorials and answers about how to combine charts, superimpose them, but none about both at the same time. Here is a picture of what I mean: I tried some stuff, here is what I have done so far : http://jsfiddle.net/8vCEs/37/ var chart; $(document).ready(function () { chart = new Highcharts.Chart({ chart: { renderTo: 'container', type: 'column' }, tooltip: { shared: false }, plotOptions: { column: { stacking: 'normal' } }, series: [{ name: '1', data: [100], grouping: false, }, { name:

Error: Data column(s) for axis #0 cannot be of type string

戏子无情 提交于 2021-01-28 08:46:18
问题 I'm trying to create a scatter chart with google charts and React/JS. I have made a test array to check if it was the correct way to send the data to the chart and it worked. But when I processed the real data and create a similar array, it gets me the error: "Data column(s) for axis #0 cannot be of type string". This is the test array that works fine: let dataTest = [ ['Día', 'Enfado', 'Irritabilidad','Dolor', 'Ansiedad'], ['1', null, 10, 20, 30], ['2', 30, 20, 10, null], ] and this is the

JFreeChart with XYBoxAnnotation Open on One Side

↘锁芯ラ 提交于 2021-01-28 08:08:20
问题 I'm using an XYBoxAnnotation to demarcate a rectangular area on a JFreeChart. I would like one side of the box to be "open", i.e go out to infinity. I tried setting the value to Double.POSITIVE_INFINITY but this did not seem to work. I also tried setting it to Double.MAX_VALUE , with no luck either. In these cases, the annotation doesn't even show up on the plot at all. And there are no exceptions thrown. Below is a very simple version of my code in which I generate the XYBoxAnnotation and

How to get Haskell Chart example1 working for Diagrams backend?

▼魔方 西西 提交于 2021-01-28 06:17:06
问题 The example outputs for Haskell's chart library look great. They all use the Cairo backend which I cannot install properly, so I'd like to try out the library using the Diagrams backend. However, it is not obvious to me how to do this. In particular, def is undefined. Can someone help me get started and show me how to modify the source code for example 1 so that it can run using the Diagrams backend? 回答1: The problematic def is the FileOptions argument to the Cairo backend's renderableToFile

How can I change the chart color using events (google charts)

Deadly 提交于 2021-01-28 06:07:05
问题 Is it possible to change the color of the series through the event? In this example I trigger an alert and a log just to see how it works, but I would like to know if it is possible to change the color of the selected option. Simple example: click on sales and the event changes the color from blue to green google.charts.load('current', {'packages':['corechart']}); google.charts.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ ['Year',

JFreeChart advancing in time?

﹥>﹥吖頭↗ 提交于 2021-01-28 06:06:53
问题 I am making an application in which I need to show in a chart the real time of capturing a certain data And it "works" except that it doesn’t keep up with the real time, it keeps counting as if time has passed! I know that it is possibly linked to this dataset.advanceTime () but without it the graph becomes static and does not advance any more even if the real time passes package com.mycompany.moveplus; import java.awt.BorderLayout; import java.awt.Color; import java.awt.EventQueue; import

React highchart: Shared tooltip in same and different chart

老子叫甜甜 提交于 2021-01-28 05:17:56
问题 I am using react-highchart for a project. And displaying two charts: 1) Line Chart with 2 series data, it will render two lines on same chart. 2) Bar or Column Chart. Now when I hover over a point it should enable tooltip on both lines in 1st chart and in column chart as well. X-axis is datetime. It should active point on both lines like this: In react-highchart , I have used shared: true attribute, but it is not making both lines active. tooltip: { enabled: true, useHTML: true, shared: true,

POI bar chart generate one series has question

馋奶兔 提交于 2021-01-28 05:10:08
问题 I use JDK8 and POI-4.1.0 use they example here a link export chart to Word .when create two series is ok two series img, but I only create one series .the chart mistake category for series one series img "lang1" "lang2" "lang3" is category name but they become series name. i have no ideal. I also find use line chart have the same problem my code public static void main(String[] args) throws Exception { List<String> listLanguages = new ArrayList<>(3); listLanguages.add("lang1");listLanguages

Negative values bars on the same matplotlib chart

喜欢而已 提交于 2021-01-28 04:33:20
问题 I am trying to display 3 bar charts on the same plot. There is an issue with bars that have negative values though, because they are hanging down either from the top or from nowhere. Any ideas how to make it look nicer? import pandas as pd import matplotlib.pyplot as plt x = range(6) a1 = [-1, -4, -3, -6, 2, 8] a2 = [ 4, 12, 8, 1, 10, 9] a3 = [100, 110, 120, 130, 115, 110] df = pd.DataFrame(index=x, data={'A': a1, 'B': a2, 'C': a3}) fig, ax = plt.subplots() ax2 = ax.twinx() ax3 = ax.twinx()