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

Support single point in area chart #25842

Merged
merged 4 commits into from
Nov 30, 2022

Conversation

AtishayMsft
Copy link
Contributor

Previous Behavior

Having single point in the area chart does not render the point

New Behavior

Area chart now supports having a single point in the chart.

Related Issue(s)

  • Fixes #

@AtishayMsft AtishayMsft changed the title Usr/atisjai/single point in area chart Support single point in area chart Nov 30, 2022
@AtishayMsft AtishayMsft marked this pull request as ready for review November 30, 2022 09:03
@AtishayMsft AtishayMsft requested a review from a team as a code owner November 30, 2022 09:03
@fabricteam
Copy link
Collaborator

fabricteam commented Nov 30, 2022

📊 Bundle size report

🤖 This report was generated against c46ff8dec351ebf57efb4114366016010b285429

@size-auditor
Copy link

size-auditor bot commented Nov 30, 2022

Asset size changes

Size Auditor did not detect a change in bundle size for any component!

Baseline commit: c46ff8dec351ebf57efb4114366016010b285429 (build)

@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 30, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 201900f:

Sandbox Source
@fluentui/react 8 starter Configuration
@fluentui/react-components 9 starter Configuration

@AtishayMsft AtishayMsft merged commit a5ea64c into master Nov 30, 2022
marcosmoura added a commit to marcosmoura/fluentui that referenced this pull request Dec 1, 2022
* master:
  BREAKING: `useTable` renamed to `useTableFeatures` (microsoft#25797)
  chore: add retries for navigation in ssr-tests-v9 (microsoft#25844)
  fix: Cell actions should have correct background when row focused within (microsoft#25790)
  applying package updates
  Disable 3 Avatar Converged active stories (microsoft#25765)
  chore: introduce TS path aliases for improved DX in v8 (microsoft#25778)
  chore: prepare release react-northstar 0.65.0 (microsoft#25446)
  refactor(scripts): encapsulate v0 and v8 tooling within its domain boundaries (microsoft#25738)
  Support single point in area chart (microsoft#25842)
  chore: enable isolateModules in all v8 packages (microsoft#25774)
  chore: refactor styles for Button (microsoft#25216)
  feat: Improve docs for `DataGrid`, export as unstable (microsoft#25805)
  applying package updates
  fix: Allow data-selection-disabled to be respected by DetailsRow (microsoft#25836)
  docs(rfcs): Update recipes rfc with chosen option and add more details (microsoft#25823)
  chore(react-textarea): migrate to new package structure (microsoft#25820)
  chore(react-switch): migrate to new package structure (microsoft#25819)
  fix(react-avatar): AvatarGroup's pie layout places inline items correctly in rtl (microsoft#25822)
  chore: add few improvements to toolbar stories (microsoft#25635)
Hotell pushed a commit to Hotell/fluentui that referenced this pull request Feb 9, 2023
* Allow single point in area chart

* Add change file

* Fix lint issue

* Add tests for area chart single point
@khmakoto khmakoto deleted the usr/atisjai/singlePointInAreaChart branch April 6, 2023 00:07
@Gutentag0004
Copy link

Gutentag0004 commented Dec 18, 2023

I just saw your fix for the drawing single point in Area chart, but did you meet the issue that the callout box appears in wrong position? I update my @fluentui/react-chart to render single point but the callout doesn't show in right location.

@AtishayMsft
Copy link
Contributor Author

@Gutentag0004 do you have a repro of your issue. Does it happen on latest version of charting library as well.

@Gutentag0004
Copy link

Gutentag0004 commented Dec 19, 2023

@AtishayMsft I resolve it, I set the xAxis to Date before. It shows the problem that callout positioning is wrong. I change the xAxis to number, it works well. BTW, can we support the custom radius of single point. I saw it was hard coded as 6.

@AtishayMsft
Copy link
Contributor Author

Got it. I have logged an issue #30118 to track this bug.
The radius of 6 px is as per design guidance. Could you tell your specific needs why you need a custom radius.

@Gutentag0004
Copy link

Because our char shows the radius as 2 and meet the issue that it can not render a single point. After apply your update it works to show the single point but found the radius is coded as 6. Our purpose is want to make the radius consistent, so it will be great if it supports custom radius.

@AtishayMsft
Copy link
Contributor Author

Do you have a mock which shows your use case of needing a radius of 2px. And you are looking for consistency with what other control?

@Gutentag0004
Copy link

#1 The result when render multiple points
image

#2 The result when render silgle point with radius of 6
image

@AtishayMsft
Copy link
Contributor Author

#1 The result when render multiple points image

#2 The result when render silgle point with radius of 6 image

What does the circle in the first graph denote. Are you able to implement it using fluent area chart.

@Gutentag0004
Copy link

This is the chart rendered by area char, the circle denotes the data point. like we have three point and it draws this line, and when the cursor is over the data, it renders the circle with radius of 2 and shows details callout info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants