billboard.js icon indicating copy to clipboard operation
billboard.js copied to clipboard

Tootip data not showing for stacking data points

Open netil opened this issue 5 years ago • 2 comments

Description

In case of combination of bubble & line chart, there're cases which data points get stacked for having same data value.

In this situation tooltip isn't showing full dataset.

Steps to check or reproduce

Hovering on bubble type data point, where line data point is positioned behind of it.

netil avatar May 29 '19 08:05 netil

This can be pretty confusing in some cases on how it should behave. So, for now will be let as-is.

If anyone has 'nice' or 'straightforward' ideas, plz leave comments.

The behaves on tooltip

Explanation of how behaves the current tooltip.grouped option.

var chart = bb.generate({
  data: {
    columns: [
	["data1", 300, 150, 300],
	["data2", 130, 150, 140]
    ],
    types: {
      data2: "scatter"
    },
  },
  tooltip: {
    grouped: true | false
  }
});

true

  • bubble/scatter: display as not grouped.

  • others: display as grouped.

    tooltip-grouped-true

false

  • all: display as not grouped.
    • But for the points where line & bubble/scatter stacks each other, there's no way on displaying all stacked data points. tooltip-grouped-false

    • Only shows the first-ish data from the node structure. Note the below example, 'data1' set as 'scatter' type and only displays 'data1' tooltip only which is the first node structurally. tooltip-grouped-false-2

netil avatar May 31 '19 07:05 netil

false -> only shows the first-ish data.

true -> display all data as grouped unless the first-ish data is bubble/scatter.

A)The grouped tooltip can help comparing data with same x-axis value. B)It can also resolve the case when they have same y-axis value.

"y-axis"(false?) -> display data with same y-axis value as the first-ish data together. (Nobody may hope the first-ish data hide other data with same y-axis.)

watnab avatar Jun 23 '20 03:06 watnab