Multiple series tooltip with irregular data - javascript

I'm trying to add two datasets to a line chart, but the problem is: I want to enable showing the tooltip for both datasets when (one of two):
Hover on a data line (without a data point) and show all line chart data
Hover on a data point, but sho the data of all the line charts
A fiddle I experimented with: https://codepen.io/anon/pen/gjbXqb?editors=0010

Related

Is there way to show only line without area in Google charts stacked line area chart with JavaScript?

I am adding three different data arrays in one chart, and one of the data sets is transparent. I would like for that data set just to have the line rather than having whole area colored.
Transparent Data
Colored Data
I had to set lineWidth of top data to 0
Code for line
Result, only midle data has line

MetricsGraphics.js linking two charts with different "chart_type" properties (javascript)

I'm using MetricsGraphics.js to plot a simple time series. I'm having trouble linking a "line" chart with a "point" chart using the linked: true option. The linking works when both charts are of the same type, but not when they're different.
The following jsfiddles show this. In the first, when you hover over data points in one chart, the points in both charts are highlighted. In the second, hovering over data points in one chart doesn't affect the other.
Both charts have chart_type: 'line': jsfiddle.net/7jc1h8vv
One chart has chart_type: 'point', the other chart_type: 'line': jsfiddle.net/7jc1h8vv/1
Question: How can I link a "point" chart and a "line" chart together? Alternatively, if that can't be done, then how can I create data symbols for each data point on the line in a 'line' chart, such that the two charts are effectively superimposed?
The MetricsGraphics.js library provides an option linked: true that will do the following, according to the doc:
Links together all other graphs whose linked option is set to true. When one graphic in that set is rolled over, the corresponding values in the other graphics are also rolled over.
See this example from the doc of two charts linked together.

I have 2 series of data in a Highchart and I only need to show one of them while ensuring that both series labels and values show in the tooltip

Is it possible to have 2 series of data in one graph where one is shown and the other is hidden, while having both series labels and values show in the tooltip?

Change fill color of selected point in Google Charts API scatter plot

I have a Google Charts scatter plot with various points specified on it. I also have a side bar with a list of values corresponding to the points on the scatter graph and when I select a side bar value, it highlights the corresponding point in the graph.
I would like to change the fill-color of the selected item when it is selected. Currently, my working selection code is:
$("#select").on('click', function() {
scatterChart.setSelection([{row: 1, column: 1}]);
});
I have tried using setValue() and setProperty on the data and have redrawn the chart but it has no affect.
Any help much appreciated.

How to draw a bar chart serie over another one bar chart serie

I'm using Jqplot and I want to draw two series on my graph.
I want these two series to be drawn as bar chart. I also want the first series to be drawn over the second one in case of there x value are the same.
How can I do it? I've tried to specify the barPadding option to 0 but the two series are drawn side by side.
Thanks for your answer.
I'm not sure I understand what you mean by "first series drawn over the second one". Would a stacked bar chart suit your purposes? Check the third example on this page: http://www.jqplot.com/deploy/dist/examples/barTest.html.

Categories