carbon-design-system / carbon-charts

:bar_chart: :chart_with_upwards_trend:⠀Robust dataviz framework implemented using D3 & typescript
https://charts.carbondesignsystem.com
Apache License 2.0
915 stars 184 forks source link

Threshold line falls outside the area chart #1904

Open sheejajoni opened 1 month ago

sheejajoni commented 1 month ago

Package

Carbon for IBM Products

Description

When we set threshold line for area chart, the line falls outside the chart even though threshold value is given as current date. Image

Component(s) impacted

Image

Browser

Chrome

@carbon/ibm-products (previously @carbon/ibm-cloud-cognitive) version

v8.12.5

Suggested Severity

Severity 2 = Aspects of design is broken, and impedes users in a significant way, but there is a way to complete their tasks. Affects major functionality, has a workaround.

Product/offering

Infrastructure

CodeSandbox or Stackblitz example

https://pages.github.ibm.com/turbonomic-ui/turbo-ibm-cds-storybook.github.io/8.12.5/?path=/docs/components-charts-grouped-areachart--grouped-area-chart-default

Steps to reproduce the issue (if applicable)

  1. Add an area chart
  2. Add a threshold line in the area chart threshold: { xAxis: [ { label: 'Current Date', value: new Date(), fillColor: cyan40, }, ], },

Even though current date is given as threshold value, the line falls outside the widget Image

Release date (if applicable)

No response

Code of Conduct

oliviaflory commented 1 month ago

@sheejajoni this is part of the Carbon charts repo, I have transferred the issue for you