Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Axis ticks placement / tooltip issues #478

Closed
theiliad opened this issue Jan 24, 2020 · 18 comments · Fixed by #499
Closed

Axis ticks placement / tooltip issues #478

theiliad opened this issue Jan 24, 2020 · 18 comments · Fixed by #499
Labels
contributor: accurat Work contributed by accurat severity: 1 Must be fixed ASAP specs-needed 🙏

Comments

@theiliad
Copy link
Member

theiliad commented Jan 24, 2020

This issue is highly visible in the area chart demos:
https://deploy-preview-412--carbon-charts-core.netlify.com

However it also exists in any chart that supports continuous scales.

Description:
image

Possible solutions:

  • Refactor of axis ticks to line up more closely with datapoints presented in the graphs
  • Sticky tooltips (could introduce its own set of disadvantages as well, still may be a possibility for users to enable if they believe that there's a continuous relationship between their datapoints...?)
  • Clustering of datapoints within a tooltip (e.g. divide grid into regions that can activate tooltips on all the points within the region + possible extra styling to highlight those points on hover within the region...?)

Looking for options here

@theiliad theiliad changed the title Axis ticks don't match datapoint placements which also can break tooltips Axis ticks placement / tooltip issues Jan 28, 2020
@theiliad
Copy link
Member Author

More examples from https://carbon-design-system.github.io/carbon-charts:

image

image

@gvnmagni
Copy link

gvnmagni commented Jan 30, 2020

Hello! We’d make the tooltip working continuously over the chart with a snap to the closer datapoints. It would work the same as it is right now, but it could be attached not to grid ticks but generally free to span on the whole chart.
If there are more datapoints at the same moment in time, they will be all shown within the tooltip.

In addition to this, we would like to make the cursor line (blue dotted line in the image) on chart always visible, even if there are no datapoints highlighted. We know this would create an exception for this specific type of charts, so please consider this as a further improvement that would be great to discuss together

Do you think this could work?

PS please note that this design is a WIP by Accurat and has not been approved by the IBM design team yet

478 - tooltip

@theiliad
Copy link
Member Author

theiliad commented Jan 30, 2020

Hello! We’d make the tooltip working continuously over the chart with a snap to the closer datapoints. It would work the same as it is right now, but it could be attached not to grid ticks but generally free to span on the whole chart.

Do you think this could work?

I sent your proposed solution to the design team.

At a glance though 2 issues still stand out to me:

  1. We would now be potentially showing 2 tooltips on 1 chart at the same time
  2. You would still miss the chance to see the comparative version of the tooltip for many axis ticks

@anne-stevens
Copy link

A few comments from Cognos Analytic's perspective:

  1. In general, the information in the proposed tooltip is fairly sparse. In the line chart example above, there is only one measure (what ever is on the y-axis). Therefore, it is easy for the user to understand that the value in the tooltip refers to that measure. However, there are many charts that would have multiple measures projected onto one data point. If the tool tip doesn't identify what value is what measure, the user has to guess. Here's some examples:

Each point in this bubble chart has 3 measures: Quantity, Food Goal and Total Goal. The tooltip clarifies which value refers to which measure.
Screen Shot 2020-01-30 at 11 01 53 AM

Another example, a treemap
Screen Shot 2020-01-30 at 10 56 36 AM

This small multiples example has only one measure in the tooltip (Total Order Sales) but it identifies not just what is in the legend, but what is on the x-axis and what is in the small multiple as well (Date | Beverages | Church St). This is a case worth considering for the sake of accessibility since we rely on tooltip info for accessibility.
Screen Shot 2020-01-30 at 11 19 46 AM

  1. Aggregation type (eg. Sum, Avg, Min, Max, Mean, Mode). This is also important information for understanding the values in tooltips. Again, an accessibility issue.

@gvnmagni
Copy link

gvnmagni commented Jan 30, 2020

Thanks @theiliad

  1. If you are referring to the black tooltip (date) and the white one (values), yes, we found this option in the Carbon_charts_Master sketch file and we thought it could be a good addition.

  2. If I got the point correctly, you are referring to axis ticks such as March (as in the following image). We don't think it would be necessary, we would remove completely the tooltip from the axis ticks since we can't really say the values of each dataseries in that specific point.
    Those values are an assumption given by lines interpolation, not actual data, and therefore it would be misleading to display those values.
    Applied to other charts (such as charts with discrete axis) this behaviour will make it work as usual since we have datapoints on ticks

Screenshot 2020-01-30 at 17 33 53

@anne-stevens
Copy link

  1. The proposal above has a vertical reference line and a callout tooltip on the x-axis to highlight the item there and make it easy to understand what date the tooltip values relate to. Two issues:
  • the solid black is very very bold. IMO it adds too much noise to the viz. What about just highlighting the x-axis label. Just a thought.
  • did you consider a reference line and a callout tooltip on the y-axis? For a scatter plot with a measure on both axes, would there be reference lines and axis tooltips on both axes, or neither?

@anne-stevens
Copy link

  1. Re. Multiple datapoints example above (2nd from the top), it looks like the tooltip has 2 values but that there aren't actually data points on the vertical reference line. I am assuming this because there are no circles data point symbols on the line there. If so, is the system interpolating the value based on how the curved line is drawn between known data points?

  2. Re. the Single data point example above (bottom example) did you consider listing the values for all three data points on that date but just highlighting the value for the highlighted point? It would provide more context to the highlighted value and eliminate the need to hover over different points one at a time.

  3. From Cognos Analytics experience, column names can be very long. If you don't have some rules for addressing max tooltip width (including truncation or text wrap) things can get out of control with huge wide tooltips that blot out a lot of the UI and become difficult to read.

@gvnmagni
Copy link

gvnmagni commented Feb 3, 2020

Hello Anne, thanks for the feedback, you pointed out important aspects of this issue.

1 - We totally agree, the tooltip should probably be adapted to difference charts

3 - You are right, the black tooltip is quite bold, we were primarily thinking about functionalities and not style, at least at the moment.
When necessary, a reference on the Y axis would be required as well.

4 - The tooltip has two values because there are two dots overlapped, we’d avoid displaying values of the lines, where we know it’s a graphical interpolation

5 - Following the original tooltip guidelines, that behaviour is given by the comparative tooltip

6 - Truncation should be probably applied in many areas, such as axis, legends and tooltips. I think this issue can be used to reference to this specific topic: -> Issue 347

@theiliad
Copy link
Member Author

theiliad commented Feb 3, 2020

4 - The tooltip has two values because there are two dots overlapped, we’d avoid displaying values of the lines, where we know it’s a graphical interpolation

I think it's a good idea to not assume an interpolation between data points by default and not show the sticky tooltip, however I think when there is a real domain within your datapoints you should be able to pass in a flag and get the sticky tooltip behaviour.

6 - Truncation should be probably applied in many areas, such as axis, legends and tooltips. I think this issue can be used to reference to this specific topic: -> Issue 347

We've added truncation to chart titles where you'd see truncated text and a tooltip onHover, however for tooltips and axis there are no specs on truncation.

@theiliad theiliad added the contributor: accurat Work contributed by accurat label Feb 4, 2020
@gvnmagni
Copy link

Hi! We designed a series of guidelines for each chart typology. You can find the sketch file with all the specs at this link and you’ll see a preview attached to this comment.

A couple of notes:

  • please consider that these are structural guidelines, the style applied to tooltip might be not consistent with the actual status of the carbon charts development. It would be great to get some feedback from Mike and the rest of the design team especially for the black tooltip on axis.
  • feedback and consideration are more than welcome, we’d be happy to discuss together any possible change

Let us know!

478 - tooltip_v03

@theiliad
Copy link
Member Author

Looks great so far. Looking forward to get design to look at these

@anne-stevens
Copy link

anne-stevens commented Feb 11, 2020 via email

@gvnmagni
Copy link

Thanks Anne, a few explanations:

Black x-axis tooltip/label:

The comparative tooltip (continuous) is the overall approach, in case of values on ticks it could work exactly as you suggest, it will just need a little exception. We totally agree that the black is really bold, this should be considered as a structural guide

(b) The ‘Jan’ ‘Feb’ axis labels come from the dataset. The full length name and year might not be in the data set. Even if they are, it is a lot of work for the system to go back into the data to determine the year and full day name just for a hover tooltip. I could see this affecting performance time.

This is a specific case that works when user upload data, we would like to set up overall rules that could give a guidance on a higher level. The charts’ code will handle longer and shorter date formats, starting from this, each following case and application will need to be considered independently (tools, editorial print,…).

(c) What if Month was on the x-axis and there were 4 years of data? In that case, the data plotted for Jan actually represents Jan 2014, Jan 2015, Jan 2016 and Jan 2017 (i.e all the Januaries in the data set). What would the black tooltip read in that case? If it lists all four Januaries, it could get pretty long winded, not to mention big..

If I got the point, this could be a line chart with 4 lines (one per each year) or a stacked chart. In both case the black tooltip should say just “January” and single elements should say “2014”, or “2015”, once hovered

Including totals in tooltips.

Totally agree! Additional indicators are super important, within the tooltip there could be any of these it just needed to the specified within the code, when designing the chart application. Including all of the indicators could be too much, even if, in the future, we might consider building an additional tooltip version that could be a more exhaustive version of this one, with room for more than one indicator.

Tooltips on colour legend and axis labels

If I got this correctly, this behaviour would happen with the comparative tooltip as well, hovering directly on the chart. It could be interesting to have an interaction on axis labels, I’m afraid that it would be a bit too much if we have the comparative tooltip working as well.

Multi Select
If I select multiple points on, say a map or bubble chart, what happens? Will the tooltip show the data for all and put a total for all? Tableau maps does a nice job of this.

We would disable comparative tooltips for bubble charts and scatterplot, since it depend on the cursor coordinates, it might include too many datapoint or elements, resulting in a really confusing tooltips.
Given the complexity of maps, we’d prefer to work on their tooltips once they are developed, it will depends a lot on the choices made on the design side.

Include both Measure name and value in tooltip
————————————————————————
| 2019 Q1 |
| Clicks unique (Sum) 31500. |
————————————————————————

We’d suggest to have a generic tooltip rule that works in most of the cases, but for sure it would be interesting to build up different cases and exceptions that could cover all of the needs.

Alluvial chart / Did you consider putting left and right axis labels outside the chart rather than inside? They could be handled like typical y-axis labels and would reduce covering up the bands in the chart.

This would be interesting to see, we’d need a good truncating function for labels but we are totally open to this

Scatter and bubble charts
Typically these have continuous measures on both axes. Your example has categorical on x-axis (month or day). For the typical case, it would be nice to hover over a point and get two blue dotted reference lines, one pointing to value on x-axis and the other to the value on the y-axis.

We tried that and we thought it could be to messy (please consider that we’d have only the tooltip on single elements for these charts), but we had both version (see attached image). I’d love to know what do you think about these

image

@theiliad
Copy link
Member Author

@gvnmagni in the descriptive tooltip example, what if the user hasn't provided a title for the y-axis?

@anne-stevens
Copy link

anne-stevens commented Feb 13, 2020 via email

@theiliad
Copy link
Member Author

@anne-stevens can't see any blue text in your comments

@anne-stevens
Copy link

anne-stevens commented Feb 14, 2020 via email

@gvnmagni
Copy link

Russel, this image shows the functionality applied to the original case (linechart)

Screenshot 2020-03-18 at 16 34 07

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor: accurat Work contributed by accurat severity: 1 Must be fixed ASAP specs-needed 🙏
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants