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

Ruler interaction replacing Grid mouse listeners for comparative tooltips #499

Merged
merged 46 commits into from
Apr 27, 2020

Conversation

lucafalasco
Copy link
Contributor

@lucafalasco lucafalasco commented Feb 17, 2020

  • add ruler functionality
  • refactor and add different but composable tooltip modes
  • color datapoints with tooltip activated
  • get dynamic data point accessor
  • basic snap
  • snap to nearest data point
  • work with discrete domains
  • test
  • change ruler color
  • disable the ruler for every chart that does not have a continuous domain (but keep snap)
  • adapt ruler behaviour when continuous axis is positioned on top
  • axis tooltip should not go out of the svg bounding box
  • only enable for timescale linechart
  • show ruler only when it's matching some points, hide it otherwise
  • remove axis tooltip
  • disable interaction with grid
  • enable ruler for all charts with data points (barcharts and piecharts excluded)

Updates

close #478
close #397

Demo screenshot or recording

ruler

Deploy

https://deploy-preview-499--carbon-charts-core.netlify.app/?path=/story/line--line-dense-time-series

@netlify
Copy link

netlify bot commented Feb 17, 2020

Deploy preview for carbon-charts-react ready!

Built with commit ced86b4

https://deploy-preview-499--carbon-charts-react.netlify.app

@netlify
Copy link

netlify bot commented Feb 17, 2020

Deploy preview for carbon-charts-angular ready!

Built with commit ced86b4

https://deploy-preview-499--carbon-charts-angular.netlify.app

@netlify
Copy link

netlify bot commented Feb 17, 2020

Deploy preview for carbon-charts-vue ready!

Built with commit ced86b4

https://deploy-preview-499--carbon-charts-vue.netlify.app

@lucafalasco lucafalasco force-pushed the tooltip-enh branch 3 times, most recently from fbb86d2 to 5b9007b Compare February 24, 2020 13:32
@theiliad
Copy link
Member

The snap to grid threshold seems a bit small to me, is that finalized?

@lucafalasco
Copy link
Contributor Author

The snap to grid threshold seems a bit small to me, is that finalized?

Forwarded question to designers 😉
I personally think it's better to keep it small (in case of really close data points), but we can maybe tweak it a little bit

@gvnmagni
Copy link

The snap to grid threshold seems a bit small to me, is that finalized?

Forwarded question to designers 😉
I personally think it's better to keep it small (in case of really close data points), but we can maybe tweak it a little bit

I'd support Luca's idea, since this kind of tooltip will be helpful especially when we'll have unusual data distributions, it would be better to keep this as small as possible.

Given this, we are totally open to make it few pixels wider if it works better, since we can change it at any time I'd say to try and to see what people think about it and, if necessary, adapt it eventually

@lucafalasco lucafalasco marked this pull request as ready for review February 28, 2020 10:12
@lucafalasco lucafalasco changed the title Add Ruler showing tooltips for continuous scales Add Ruler triggering data points tooltips, add axis tooltips Feb 28, 2020
@lucafalasco lucafalasco changed the title Add Ruler triggering data points tooltips, add axis tooltips Add Ruler triggering data points tooltips, add axis tooltips for continuous scales Feb 28, 2020
Copy link
Member

@theiliad theiliad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't reviewed all of the code yet. I see lots of readability issues so far, but the demos seem to be functioning well. @zvonimirfras @cal-smith please chime in

@tw15egan feel free as well

packages/core/package.json Outdated Show resolved Hide resolved
packages/core/src/components/axes/ruler.ts Outdated Show resolved Hide resolved
@lucafalasco
Copy link
Contributor Author

lucafalasco commented Feb 28, 2020

Haven't reviewed all of the code yet. I see lots of readability issues so far, but the demos seem to be functioning well.

@theiliad what do you mean with "readability issues"? are you talking about specific code readability (in that case what exactly did you find unreadable?) or are you referring to the ruler/tooltips functionality itself which you consider not clear enough?

Copy link
Member

@zvonimirfras zvonimirfras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few quick possible improvements. I'll have to do a deeper read later.

packages/core/src/configuration.ts Outdated Show resolved Hide resolved
packages/core/src/components/axes/ruler.ts Outdated Show resolved Hide resolved
packages/core/src/components/axes/ruler.ts Outdated Show resolved Hide resolved
packages/core/src/components/axes/ruler.ts Outdated Show resolved Hide resolved
@cal-smith
Copy link
Contributor

image

The box around the x-axis values doesn't look finished ... it seems like it might need some more padding ... is this the final design or still WIP?

Also, I haven't looked into the code yet, but (how) does this handle double x-axis, and only top x-axis?

@lucafalasco lucafalasco force-pushed the tooltip-enh branch 2 times, most recently from 24fe957 to bb46e7c Compare March 3, 2020 16:44
@lucafalasco
Copy link
Contributor Author

image

The box around the x-axis values doesn't look finished ... it seems like it might need some more padding ... is this the final design or still WIP?

Also, I haven't looked into the code yet, but (how) does this handle double x-axis, and only top x-axis?

thank you @cal-smith, apparently that was just an issue with firefox not handling a specific SVG attribute for baseline, should be ok now, and yes, the design is final.

Regarding different axis behaviours, this is the only one supported from the design at the moment.

@lucafalasco
Copy link
Contributor Author

lucafalasco commented Mar 3, 2020

A few quick possible improvements. I'll have to do a deeper read later.

@zvonimirfras thanks, pushed a commit with some refactor before

@cal-smith
Copy link
Contributor

thank you @cal-smith, apparently that was just an issue with firefox not handling a specific SVG attribute for baseline, should be ok now, and yes, the design is final.

Cool, just checked it out and that definitely looks better 👍

@designertyler
Copy link

I think I agree with @theiliad that the ruler shouldn't appear unless there's a value

yes we show that to enable tooltips on the grid, we should just stop showing if there are no values lying within that line.

One thing I noticed on hover is there's a double ruler when there are multiple values on a tick.

on white and g10 the second one is blue and the dark themes they're both white.

image

packages/core/demo/data/line.ts Outdated Show resolved Hide resolved
// set current hovered elements
this.hoveredElements = hoveredElements;

this.services.events.dispatchEvent("show-tooltip", {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice 👍

hideRuler() {
const svg = this.parent;
const ruler = DOMUtils.appendOrSelect(svg, "g.ruler");
const dataPointElements = svg.selectAll("[role=graphics-symbol]");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why use role to select instead of something like svg.selectAll("circle.dot"); ?
if it also works, it seems more conventional in this codebase

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The use of that selector seemed to me more appropriate since we initially thought to enable the ruler on very different charts, which might have different graphic elements that need to be highlighted (for example, if I remember correctly there was an idea to have other shapes for the scatterplot other than circles - squares, triangles etc) that way we could have a single selector which includes all different svg elements.
But you're right, at the moment the circle.dot selector should work across all current scenarios 👍

packages/core/src/styles/components/_ruler.scss Outdated Show resolved Hide resolved
packages/core/src/styles/components/_ruler.scss Outdated Show resolved Hide resolved
packages/core/src/styles/components/_ruler.scss Outdated Show resolved Hide resolved
packages/core/src/styles/components/_ruler.scss Outdated Show resolved Hide resolved
@lucafalasco lucafalasco changed the title Add Ruler triggering data points tooltips on linechart Ruler interaction replacing Grid mouse listeners for comparative tooltips Apr 23, 2020
Copy link
Member

@theiliad theiliad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, couple of final touches we need:

  1. scatter is showing no tooltip
    image

  2. same for bubble
    image

@lucafalasco
Copy link
Contributor Author

thanks @theiliad, that was an issue with linear scales, should be fixed now 👍

@caesarsol caesarsol mentioned this pull request Apr 27, 2020
@theiliad theiliad merged commit 57f4f1d into carbon-design-system:master Apr 27, 2020
@theiliad theiliad deleted the tooltip-enh branch April 27, 2020 20:15
ilariaventurini pushed a commit to accurat/carbon-charts that referenced this pull request May 11, 2020
…tips (carbon-design-system#499)

* add ruler and axis tooltip

* move ruler logic to it's own graphFrameComponent

* refactor, add axis tooltip dynamic width, add matching elements hovering

* use getDomainValue instead of hardcoded accessor

* add snap to nearest point

* use getSVGElementSize to get backdrop height

* remove useless code

* add trigger mouseout in hideRuler to only highlight single hovered element

* WIP

* fix categorical scale elements mouseover trigger

* fix close points mouseover/out trigger

* fix import order and package version

* add more test data

* add crosshair cursor when ruler is active to better select data points

* refactor, more docs

* fix axis tooltip baseline

* minor refactor

Co-Authored-By: Zvonimir Fras <[email protected]>

* change ruler color

* a11y bubble

* only show ruler for continuous domain - wip

* add support for top axis

* no need to support discrete scales anymore

* make sure tooltip does not go out of axis bbox

* remove axis tooltip

* only show ruler if there's match with data points

* only show ruler on timescale linechart

* add filter for items getting null values at times, breaking tooltip

* refactor

* fix(core): update import path carbon-components

fix carbon-design-system#546

* v0.30.7

* Merge pull request carbon-design-system#529 from theiliad/tabular-data-format

* add basic tabular data format support

* string updates

* finalize line graph implementation with tabular data support

* cleanup

* finalize scatter graph with support for tabular data

* commented out ideas for the data format

* time-series support for tabular data within line graph

* scatter support

* optimize logic to find main vertical & horizontal axes

* remove primary & secondary labels

* bubble chart support

* grouped bar support

* horizontal grouped bar

* fix legend filtering

* fix bubble and scatter

* fix bar hover errors

* simple bar support

* simple bar time-series support

* horizontal simple bar support

* more graph support

* fix pie tooltip

* fix donut center value

* fix line & scatter demo ranges

* fix bar demos

* stacked data supprot

* backwards data format compatibility

* fix plotting of datums with a value of 0

* fixed stacked bar tooltip

* remove primary, secondary, useAsGraphDomain/Range

* Update packages/core/src/model.ts

Co-Authored-By: natashadecoste <[email protected]>

* apply suggested PR changes

* fix group bar positioning issues

* apply PR suggested changes

* Update packages/core/demo/data/bar.ts

Co-Authored-By: natashadecoste <[email protected]>

* Update packages/core/demo/data/bar.ts

Co-Authored-By: natashadecoste <[email protected]>

* Update packages/core/demo/data/bar.ts

Co-Authored-By: natashadecoste <[email protected]>

* rename "identifier" to "mapsTo"

* add tutorials section to core storybook

* add links to errors

* remove unnecessary comment

* add custom color scale support

* apply PR suggested changes

* fix tests

Co-authored-by: natashadecoste <[email protected]>

* v0.30.8

* Apply suggestions from code review

Co-Authored-By: Eliad Moosavi <[email protected]>

* applied suggestions from review

* fix ruler css

* Update packages/core/src/components/axes/ruler.ts

Co-Authored-By: Eliad Moosavi <[email protected]>

* Update packages/core/src/styles/components/_ruler.scss

Co-Authored-By: Eliad Moosavi <[email protected]>

* Update packages/core/src/components/axes/ruler.ts

Co-Authored-By: Eliad Moosavi <[email protected]>

* add suggestions from review

* Update packages/core/demo/data/line.ts

Co-Authored-By: natashadecoste <[email protected]>

* Apply suggestions from code review

Co-Authored-By: natashadecoste <[email protected]>

* enable ruler on bubble and scatter

* disable mouse listeners on grid

* enable ruler for every scale type

* fix ruler on linear scales, refactor matches logic

Co-authored-by: Zvonimir Fras <[email protected]>
Co-authored-by: Natasha DeCoste <[email protected]>
Co-authored-by: carbon-bot <[email protected]>
Co-authored-by: Eliad Moosavi <[email protected]>
theiliad added a commit that referenced this pull request May 13, 2020
* Time series: add example to show the bug about labels

* Time series: fix bug about labels

* Revert "Time series: fix bug about labels"

This reverts commit 7c055fe.

* Fix linter problems

* Fix logic computing timeIntervalName

* Rename variables inside closestTimeIntervalName function

* Time series axis: use scale nice

* Remove useless demo example

* fix scatter interface

* v0.30.18

* Ruler interaction replacing Grid mouse listeners for comparative tooltips (#499)

* add ruler and axis tooltip

* move ruler logic to it's own graphFrameComponent

* refactor, add axis tooltip dynamic width, add matching elements hovering

* use getDomainValue instead of hardcoded accessor

* add snap to nearest point

* use getSVGElementSize to get backdrop height

* remove useless code

* add trigger mouseout in hideRuler to only highlight single hovered element

* WIP

* fix categorical scale elements mouseover trigger

* fix close points mouseover/out trigger

* fix import order and package version

* add more test data

* add crosshair cursor when ruler is active to better select data points

* refactor, more docs

* fix axis tooltip baseline

* minor refactor

Co-Authored-By: Zvonimir Fras <[email protected]>

* change ruler color

* a11y bubble

* only show ruler for continuous domain - wip

* add support for top axis

* no need to support discrete scales anymore

* make sure tooltip does not go out of axis bbox

* remove axis tooltip

* only show ruler if there's match with data points

* only show ruler on timescale linechart

* add filter for items getting null values at times, breaking tooltip

* refactor

* fix(core): update import path carbon-components

fix #546

* v0.30.7

* Merge pull request #529 from theiliad/tabular-data-format

* add basic tabular data format support

* string updates

* finalize line graph implementation with tabular data support

* cleanup

* finalize scatter graph with support for tabular data

* commented out ideas for the data format

* time-series support for tabular data within line graph

* scatter support

* optimize logic to find main vertical & horizontal axes

* remove primary & secondary labels

* bubble chart support

* grouped bar support

* horizontal grouped bar

* fix legend filtering

* fix bubble and scatter

* fix bar hover errors

* simple bar support

* simple bar time-series support

* horizontal simple bar support

* more graph support

* fix pie tooltip

* fix donut center value

* fix line & scatter demo ranges

* fix bar demos

* stacked data supprot

* backwards data format compatibility

* fix plotting of datums with a value of 0

* fixed stacked bar tooltip

* remove primary, secondary, useAsGraphDomain/Range

* Update packages/core/src/model.ts

Co-Authored-By: natashadecoste <[email protected]>

* apply suggested PR changes

* fix group bar positioning issues

* apply PR suggested changes

* Update packages/core/demo/data/bar.ts

Co-Authored-By: natashadecoste <[email protected]>

* Update packages/core/demo/data/bar.ts

Co-Authored-By: natashadecoste <[email protected]>

* Update packages/core/demo/data/bar.ts

Co-Authored-By: natashadecoste <[email protected]>

* rename "identifier" to "mapsTo"

* add tutorials section to core storybook

* add links to errors

* remove unnecessary comment

* add custom color scale support

* apply PR suggested changes

* fix tests

Co-authored-by: natashadecoste <[email protected]>

* v0.30.8

* Apply suggestions from code review

Co-Authored-By: Eliad Moosavi <[email protected]>

* applied suggestions from review

* fix ruler css

* Update packages/core/src/components/axes/ruler.ts

Co-Authored-By: Eliad Moosavi <[email protected]>

* Update packages/core/src/styles/components/_ruler.scss

Co-Authored-By: Eliad Moosavi <[email protected]>

* Update packages/core/src/components/axes/ruler.ts

Co-Authored-By: Eliad Moosavi <[email protected]>

* add suggestions from review

* Update packages/core/demo/data/line.ts

Co-Authored-By: natashadecoste <[email protected]>

* Apply suggestions from code review

Co-Authored-By: natashadecoste <[email protected]>

* enable ruler on bubble and scatter

* disable mouse listeners on grid

* enable ruler for every scale type

* fix ruler on linear scales, refactor matches logic

Co-authored-by: Zvonimir Fras <[email protected]>
Co-authored-by: Natasha DeCoste <[email protected]>
Co-authored-by: carbon-bot <[email protected]>
Co-authored-by: Eliad Moosavi <[email protected]>

* Ruler fix (#598)

* fix elements highlighting

* fix multiple matching points

* refactor

* dead code

* fix type

* refactor reducer logic

* more dead code

* Update packages/core/src/components/axes/ruler.ts

Co-Authored-By: Eliad Moosavi <[email protected]>

* apply suggestion from review

* rename

* add orientation support

* fix wrong y offset in mouse coords

* better typing

Co-authored-by: Eliad Moosavi <[email protected]>

* fix vue type check for charting data

* Add Svelte wrappers (#569)

* feat: add svelte wrappers

* chore(svelte): format babelrc, rollup config

* chore(deps-dev): lock @storybook/svelte version

Co-Authored-By: Eliad Moosavi <[email protected]>

* chore(deps-dev): lock svelte version

Co-Authored-By: Eliad Moosavi <[email protected]>

* chore(deps-dev): lock svelte-loader version

Co-Authored-By: Eliad Moosavi <[email protected]>

* docs(svelte): fill in Codesandbox section

* chore(svelte): define maintainers, contributors in package.json

* docs(svelte): add codesandbox

* chore(svelte): update package version to 0.30.18

Co-Authored-By: Eliad Moosavi <[email protected]>

* chore(yarn): rebuild lockfile to fix errored ci

Co-authored-by: Eliad Moosavi <[email protected]>

* Update README.md

* v0.30.19

* Merge pull request #581 from accurat/radar

* Radar setup

* Radar: create center and spokes

* Radar refactor

* Radar: Do not render anything if width or height are 0

* Radar: create blobs (wip)

* Radar: set colors

* Radar: refactor

* Radar: create x axes

* Radar: refactor

* Radar: fix color opacity

* Radar: Compute ticks with a minimum value

* Radar: draw y axis

* Radar: y axes start from the min tick value

* Radar: add exit for x axes

* Radar: blob creation refactor

* Radar: rename classes

* Radar: fix class name

* Radar: mini refactor

* Radar: fix blobs bind

* Radar: style changes

* Radar: fix min radius logic

* Radar: bind displayData to x axes not data

* Radar: add transitions

* Radar: add key labels (wip)

* Radar: change margin value

* Radar: fix labels position

* fix(core): fix backwards compatibility for pie/donut (#576)

* fix(core): fix pie model to ignore dataset name when converting to tabular

* apply review changes

* provide all datapoint info to stacked bar tooltips (#573)

* Merge pull request #574 from theiliad/axis-formatters

* optimize axis tick formatting

* Update packages/core/src/components/axes/axis.ts

Co-Authored-By: natashadecoste <[email protected]>

* optimize axis formatter for time-scale when user has already provided one

Co-authored-by: natashadecoste <[email protected]>

* v0.30.12

* fix(core): Support for Horizontal Line and Scatter Chart

* fix line graph update issues

* v0.30.13

* Change method name

* v0.30.14

* Fix linting problem about methods order

* v0.30.15

* Radar: fix y axes transitions

* Code comments for tools.ts (#416)

* update documentation for tools.ts

* docs(tools.ts): api documentation

Co-authored-by: Eliad Moosavi <[email protected]>

* remove bbox dependency on pie labels

* Merge pull request #588 from accurat/invalid-time-value-bug

* Fix bug `RangeError Invalid time value`

* Extends domain refactor

* Time series: add example with addSpaceOnEdge = 0

* Rename functions

* Change method order

* v0.30.16

* v0.30.17

* Radar: use the new .join d3 method

* Use join to manage enter, update, exit logic

* Radar: fill missing data

* Radar: fix animations but need a refactor

* Radar: add events

* Radar: add tooltip

* Radar: miss an import

* Radar: use groupMapsTo

* Radar: number of spokes doesn't change

* Radar: use groupMapsTo for data mapping

* Radar: show NA when data are missing

* Radar: add y labels

* Radar: remove events on blobs

* Radar: left align

* Radar: create rectangles over x axis

* Radar: make x axis dashed on mouse over

* Radar: add dots

* Radar: move utility functions in another file

* Radar: fix radial label placement for negative angles

* Radar: refactor

* Radar: radialLabelPlacement refactor

* Radar: better logic to center chart

* Radar: fix x axis style when overed

* Radar: change blobs opacity

* Radar: create y axes transition

* Radar: create x axes transition

* Radar: create blobs transition

* Radar: x and y labels transition

* Radar: fix transitions

* Radar: more left space for y labels

* Radar: remove unused imports

* Radar: use the right transitions

* Radar: remove logs

* Radar: remove debug stuff

* Radar: update y labels

* Radar: fix Firefox bug

* Radar: move constants to configuration

* Radar: rename variables

* Radar: fix typo

* Radar: update comments

* Radar: move lodash methods inside Tools

* Radar: add examples and make radar more generic

* Radar: fix tooltip value

* Radar: fix tooltip data order

* Radar: fix radar default formatter

* Radar: fix showing dots

* Radar: use variable instead of recompute value

* Radar: create enums from textAnchor and dominantBaseline values

* Radar: put dots radius to radar configuration

* Radar: use tabs instead of spaces

* Radar: use helper function for accesing properties

* Radar: get property from options

Co-authored-by: natashadecoste <[email protected]>
Co-authored-by: Eliad Moosavi <[email protected]>
Co-authored-by: carbon-bot <[email protected]>
Co-authored-by: Serena Girardi <[email protected]>
Co-authored-by: Eliad Moosavi <[email protected]>

* v0.30.20

Co-authored-by: Fei <[email protected]>
Co-authored-by: carbon-bot <[email protected]>
Co-authored-by: Luca Falasco <[email protected]>
Co-authored-by: Zvonimir Fras <[email protected]>
Co-authored-by: Natasha DeCoste <[email protected]>
Co-authored-by: Eliad Moosavi <[email protected]>
Co-authored-by: Eliad Moosavi <[email protected]>
Co-authored-by: Eric Liu <[email protected]>
Co-authored-by: Serena Girardi <[email protected]>
theiliad added a commit to theiliad/carbon-charts that referenced this pull request May 17, 2021
…tips (carbon-design-system#499)

* add ruler and axis tooltip

* move ruler logic to it's own graphFrameComponent

* refactor, add axis tooltip dynamic width, add matching elements hovering

* use getDomainValue instead of hardcoded accessor

* add snap to nearest point

* use getSVGElementSize to get backdrop height

* remove useless code

* add trigger mouseout in hideRuler to only highlight single hovered element

* WIP

* fix categorical scale elements mouseover trigger

* fix close points mouseover/out trigger

* fix import order and package version

* add more test data

* add crosshair cursor when ruler is active to better select data points

* refactor, more docs

* fix axis tooltip baseline

* minor refactor

Co-Authored-By: Zvonimir Fras <[email protected]>

* change ruler color

* a11y bubble

* only show ruler for continuous domain - wip

* add support for top axis

* no need to support discrete scales anymore

* make sure tooltip does not go out of axis bbox

* remove axis tooltip

* only show ruler if there's match with data points

* only show ruler on timescale linechart

* add filter for items getting null values at times, breaking tooltip

* refactor

* fix(core): update import path carbon-components

fix carbon-design-system#546

* v0.30.7

* Merge pull request carbon-design-system#529 from theiliad/tabular-data-format

* add basic tabular data format support

* string updates

* finalize line graph implementation with tabular data support

* cleanup

* finalize scatter graph with support for tabular data

* commented out ideas for the data format

* time-series support for tabular data within line graph

* scatter support

* optimize logic to find main vertical & horizontal axes

* remove primary & secondary labels

* bubble chart support

* grouped bar support

* horizontal grouped bar

* fix legend filtering

* fix bubble and scatter

* fix bar hover errors

* simple bar support

* simple bar time-series support

* horizontal simple bar support

* more graph support

* fix pie tooltip

* fix donut center value

* fix line & scatter demo ranges

* fix bar demos

* stacked data supprot

* backwards data format compatibility

* fix plotting of datums with a value of 0

* fixed stacked bar tooltip

* remove primary, secondary, useAsGraphDomain/Range

* Update packages/core/src/model.ts

Co-Authored-By: natashadecoste <[email protected]>

* apply suggested PR changes

* fix group bar positioning issues

* apply PR suggested changes

* Update packages/core/demo/data/bar.ts

Co-Authored-By: natashadecoste <[email protected]>

* Update packages/core/demo/data/bar.ts

Co-Authored-By: natashadecoste <[email protected]>

* Update packages/core/demo/data/bar.ts

Co-Authored-By: natashadecoste <[email protected]>

* rename "identifier" to "mapsTo"

* add tutorials section to core storybook

* add links to errors

* remove unnecessary comment

* add custom color scale support

* apply PR suggested changes

* fix tests

Co-authored-by: natashadecoste <[email protected]>

* v0.30.8

* Apply suggestions from code review

Co-Authored-By: Eliad Moosavi <[email protected]>

* applied suggestions from review

* fix ruler css

* Update packages/core/src/components/axes/ruler.ts

Co-Authored-By: Eliad Moosavi <[email protected]>

* Update packages/core/src/styles/components/_ruler.scss

Co-Authored-By: Eliad Moosavi <[email protected]>

* Update packages/core/src/components/axes/ruler.ts

Co-Authored-By: Eliad Moosavi <[email protected]>

* add suggestions from review

* Update packages/core/demo/data/line.ts

Co-Authored-By: natashadecoste <[email protected]>

* Apply suggestions from code review

Co-Authored-By: natashadecoste <[email protected]>

* enable ruler on bubble and scatter

* disable mouse listeners on grid

* enable ruler for every scale type

* fix ruler on linear scales, refactor matches logic

Co-authored-by: Zvonimir Fras <[email protected]>
Co-authored-by: Natasha DeCoste <[email protected]>
Co-authored-by: carbon-bot <[email protected]>
Co-authored-by: Eliad Moosavi <[email protected]>
theiliad added a commit to theiliad/carbon-charts that referenced this pull request May 17, 2021
…labels-bug

* Time series: add example to show the bug about labels

* Time series: fix bug about labels

* Revert "Time series: fix bug about labels"

This reverts commit 7c055fe.

* Fix linter problems

* Fix logic computing timeIntervalName

* Rename variables inside closestTimeIntervalName function

* Time series axis: use scale nice

* Remove useless demo example

* fix scatter interface

* v0.30.18

* Ruler interaction replacing Grid mouse listeners for comparative tooltips (carbon-design-system#499)

* add ruler and axis tooltip

* move ruler logic to it's own graphFrameComponent

* refactor, add axis tooltip dynamic width, add matching elements hovering

* use getDomainValue instead of hardcoded accessor

* add snap to nearest point

* use getSVGElementSize to get backdrop height

* remove useless code

* add trigger mouseout in hideRuler to only highlight single hovered element

* WIP

* fix categorical scale elements mouseover trigger

* fix close points mouseover/out trigger

* fix import order and package version

* add more test data

* add crosshair cursor when ruler is active to better select data points

* refactor, more docs

* fix axis tooltip baseline

* minor refactor

Co-Authored-By: Zvonimir Fras <[email protected]>

* change ruler color

* a11y bubble

* only show ruler for continuous domain - wip

* add support for top axis

* no need to support discrete scales anymore

* make sure tooltip does not go out of axis bbox

* remove axis tooltip

* only show ruler if there's match with data points

* only show ruler on timescale linechart

* add filter for items getting null values at times, breaking tooltip

* refactor

* fix(core): update import path carbon-components

fix carbon-design-system#546

* v0.30.7

* Merge pull request carbon-design-system#529 from theiliad/tabular-data-format

* add basic tabular data format support

* string updates

* finalize line graph implementation with tabular data support

* cleanup

* finalize scatter graph with support for tabular data

* commented out ideas for the data format

* time-series support for tabular data within line graph

* scatter support

* optimize logic to find main vertical & horizontal axes

* remove primary & secondary labels

* bubble chart support

* grouped bar support

* horizontal grouped bar

* fix legend filtering

* fix bubble and scatter

* fix bar hover errors

* simple bar support

* simple bar time-series support

* horizontal simple bar support

* more graph support

* fix pie tooltip

* fix donut center value

* fix line & scatter demo ranges

* fix bar demos

* stacked data supprot

* backwards data format compatibility

* fix plotting of datums with a value of 0

* fixed stacked bar tooltip

* remove primary, secondary, useAsGraphDomain/Range

* Update packages/core/src/model.ts

Co-Authored-By: natashadecoste <[email protected]>

* apply suggested PR changes

* fix group bar positioning issues

* apply PR suggested changes

* Update packages/core/demo/data/bar.ts

Co-Authored-By: natashadecoste <[email protected]>

* Update packages/core/demo/data/bar.ts

Co-Authored-By: natashadecoste <[email protected]>

* Update packages/core/demo/data/bar.ts

Co-Authored-By: natashadecoste <[email protected]>

* rename "identifier" to "mapsTo"

* add tutorials section to core storybook

* add links to errors

* remove unnecessary comment

* add custom color scale support

* apply PR suggested changes

* fix tests

Co-authored-by: natashadecoste <[email protected]>

* v0.30.8

* Apply suggestions from code review

Co-Authored-By: Eliad Moosavi <[email protected]>

* applied suggestions from review

* fix ruler css

* Update packages/core/src/components/axes/ruler.ts

Co-Authored-By: Eliad Moosavi <[email protected]>

* Update packages/core/src/styles/components/_ruler.scss

Co-Authored-By: Eliad Moosavi <[email protected]>

* Update packages/core/src/components/axes/ruler.ts

Co-Authored-By: Eliad Moosavi <[email protected]>

* add suggestions from review

* Update packages/core/demo/data/line.ts

Co-Authored-By: natashadecoste <[email protected]>

* Apply suggestions from code review

Co-Authored-By: natashadecoste <[email protected]>

* enable ruler on bubble and scatter

* disable mouse listeners on grid

* enable ruler for every scale type

* fix ruler on linear scales, refactor matches logic

Co-authored-by: Zvonimir Fras <[email protected]>
Co-authored-by: Natasha DeCoste <[email protected]>
Co-authored-by: carbon-bot <[email protected]>
Co-authored-by: Eliad Moosavi <[email protected]>

* Ruler fix (carbon-design-system#598)

* fix elements highlighting

* fix multiple matching points

* refactor

* dead code

* fix type

* refactor reducer logic

* more dead code

* Update packages/core/src/components/axes/ruler.ts

Co-Authored-By: Eliad Moosavi <[email protected]>

* apply suggestion from review

* rename

* add orientation support

* fix wrong y offset in mouse coords

* better typing

Co-authored-by: Eliad Moosavi <[email protected]>

* fix vue type check for charting data

* Add Svelte wrappers (carbon-design-system#569)

* feat: add svelte wrappers

* chore(svelte): format babelrc, rollup config

* chore(deps-dev): lock @storybook/svelte version

Co-Authored-By: Eliad Moosavi <[email protected]>

* chore(deps-dev): lock svelte version

Co-Authored-By: Eliad Moosavi <[email protected]>

* chore(deps-dev): lock svelte-loader version

Co-Authored-By: Eliad Moosavi <[email protected]>

* docs(svelte): fill in Codesandbox section

* chore(svelte): define maintainers, contributors in package.json

* docs(svelte): add codesandbox

* chore(svelte): update package version to 0.30.18

Co-Authored-By: Eliad Moosavi <[email protected]>

* chore(yarn): rebuild lockfile to fix errored ci

Co-authored-by: Eliad Moosavi <[email protected]>

* Update README.md

* v0.30.19

* Merge pull request carbon-design-system#581 from accurat/radar

* Radar setup

* Radar: create center and spokes

* Radar refactor

* Radar: Do not render anything if width or height are 0

* Radar: create blobs (wip)

* Radar: set colors

* Radar: refactor

* Radar: create x axes

* Radar: refactor

* Radar: fix color opacity

* Radar: Compute ticks with a minimum value

* Radar: draw y axis

* Radar: y axes start from the min tick value

* Radar: add exit for x axes

* Radar: blob creation refactor

* Radar: rename classes

* Radar: fix class name

* Radar: mini refactor

* Radar: fix blobs bind

* Radar: style changes

* Radar: fix min radius logic

* Radar: bind displayData to x axes not data

* Radar: add transitions

* Radar: add key labels (wip)

* Radar: change margin value

* Radar: fix labels position

* fix(core): fix backwards compatibility for pie/donut (carbon-design-system#576)

* fix(core): fix pie model to ignore dataset name when converting to tabular

* apply review changes

* provide all datapoint info to stacked bar tooltips (carbon-design-system#573)

* Merge pull request carbon-design-system#574 from theiliad/axis-formatters

* optimize axis tick formatting

* Update packages/core/src/components/axes/axis.ts

Co-Authored-By: natashadecoste <[email protected]>

* optimize axis formatter for time-scale when user has already provided one

Co-authored-by: natashadecoste <[email protected]>

* v0.30.12

* fix(core): Support for Horizontal Line and Scatter Chart

* fix line graph update issues

* v0.30.13

* Change method name

* v0.30.14

* Fix linting problem about methods order

* v0.30.15

* Radar: fix y axes transitions

* Code comments for tools.ts (carbon-design-system#416)

* update documentation for tools.ts

* docs(tools.ts): api documentation

Co-authored-by: Eliad Moosavi <[email protected]>

* remove bbox dependency on pie labels

* Merge pull request carbon-design-system#588 from accurat/invalid-time-value-bug

* Fix bug `RangeError Invalid time value`

* Extends domain refactor

* Time series: add example with addSpaceOnEdge = 0

* Rename functions

* Change method order

* v0.30.16

* v0.30.17

* Radar: use the new .join d3 method

* Use join to manage enter, update, exit logic

* Radar: fill missing data

* Radar: fix animations but need a refactor

* Radar: add events

* Radar: add tooltip

* Radar: miss an import

* Radar: use groupMapsTo

* Radar: number of spokes doesn't change

* Radar: use groupMapsTo for data mapping

* Radar: show NA when data are missing

* Radar: add y labels

* Radar: remove events on blobs

* Radar: left align

* Radar: create rectangles over x axis

* Radar: make x axis dashed on mouse over

* Radar: add dots

* Radar: move utility functions in another file

* Radar: fix radial label placement for negative angles

* Radar: refactor

* Radar: radialLabelPlacement refactor

* Radar: better logic to center chart

* Radar: fix x axis style when overed

* Radar: change blobs opacity

* Radar: create y axes transition

* Radar: create x axes transition

* Radar: create blobs transition

* Radar: x and y labels transition

* Radar: fix transitions

* Radar: more left space for y labels

* Radar: remove unused imports

* Radar: use the right transitions

* Radar: remove logs

* Radar: remove debug stuff

* Radar: update y labels

* Radar: fix Firefox bug

* Radar: move constants to configuration

* Radar: rename variables

* Radar: fix typo

* Radar: update comments

* Radar: move lodash methods inside Tools

* Radar: add examples and make radar more generic

* Radar: fix tooltip value

* Radar: fix tooltip data order

* Radar: fix radar default formatter

* Radar: fix showing dots

* Radar: use variable instead of recompute value

* Radar: create enums from textAnchor and dominantBaseline values

* Radar: put dots radius to radar configuration

* Radar: use tabs instead of spaces

* Radar: use helper function for accesing properties

* Radar: get property from options

Co-authored-by: natashadecoste <[email protected]>
Co-authored-by: Eliad Moosavi <[email protected]>
Co-authored-by: carbon-bot <[email protected]>
Co-authored-by: Serena Girardi <[email protected]>
Co-authored-by: Eliad Moosavi <[email protected]>

* v0.30.20

Co-authored-by: Fei <[email protected]>
Co-authored-by: carbon-bot <[email protected]>
Co-authored-by: Luca Falasco <[email protected]>
Co-authored-by: Zvonimir Fras <[email protected]>
Co-authored-by: Natasha DeCoste <[email protected]>
Co-authored-by: Eliad Moosavi <[email protected]>
Co-authored-by: Eliad Moosavi <[email protected]>
Co-authored-by: Eric Liu <[email protected]>
Co-authored-by: Serena Girardi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
9 participants