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

tweak(tupaiaWeb): RN-249: getting x-Name in viz export #5886

Merged
merged 7 commits into from
Nov 27, 2024

Conversation

hrazasalman
Copy link
Contributor

@hrazasalman hrazasalman commented Sep 9, 2024

Issue #: RN-249

Changes:

  • Included the X-axis label in the visualization export preview.
  • Repositioned the legend to enhance clarity and readability.

Screenshots:

Before:
Screenshot 2024-09-09 at 9 25 08 pm

After:
Screenshot 2024-09-09 at 9 34 31 pm

@@ -252,7 +252,6 @@ export const CartesianChart = ({
<Legend
verticalAlign={verticalAlign}
align={align}
layout={layout}
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 'layout' property (whether 'horizontal' or 'vertical') does not affect the custom component as expected. This is because the component already has its own styling, including alignment and flex properties. Therefore, the layout property is not needed in this case.

return {
value: label,
fill: fillColor,
offset: -5,
offset: isExporting ? -50 : -5,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is intended to prevent overlapping between tick labels and the x-axis. Given the tick labels are restricted to a maximum number of characters (using ellipses for longer text) this approach should resolve the issue.

@@ -76,6 +76,7 @@ interface XAxisProps {

export const XAxis = ({ config, report, isExporting = false, isEnlarged = false }: XAxisProps) => {
const fillColor = isExporting ? DARK_BLUE : getContrastTextColor();
const tickMargin = isExporting ? 20 : 0;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the space between the x-axis label and tick label.

Copy link
Contributor

@alexd-bes alexd-bes left a comment

Choose a reason for hiding this comment

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

LGTM, nice work

alexd-bes and others added 6 commits September 13, 2024 10:50
* tweak(centralServer): RN-1351: Handle bad DHIS2 sync requests (#5887)

Throw an error and register bad requests on dhis sync queue

* tweak(datatrakWeb): RN-1438: Upgrade React Query to V4 (#5868)

* Bumping react-query

* Update render.tsx

* fixing Reports.test.tsx

* navigation bug fix

* removed logging

* tweak(adminPanel): RN-1439: Upgrade React Query to V4 (#5875)

* bumping to v4

* Update yarn.lock

* tweak(psss): RN-1442: Upgrade React Query to V4 (#5874)

* upgrade

* Update yarn.lock

* tweak(lesmis): RN-1441: Upgrade React Query to V4 (#5873)

* upgrade

* Update yarn.lock

* tweak(tupaiaWeb): RN-1440: Upgrade React Query to V4 (#5870)

* Bumping react-query

* Bumping react-query to v4

* Update render.tsx

* GitAction fix

* fixing Reports.test.tsx

* navigation bug fix

* review update

* removed logging

* Update yarn.lock

* Update yarn.lock

* Update VerifyEmailPage.tsx

* Update useReportPreview.js

* fix(adminPanel): Miscellaneous Bug fixes (Tiny) (#5891)

* bugfix

* update

* updates

* tweak(tupaiaWeb): RN-1437: Download files visual restyle (#5889)

* Common download files component

* PR fix

---------

Co-authored-by: Salman <114740396+hrazasalman@users.noreply.github.com>
merge: update branch with latest dev
merge: update branch with latest dev
@tcaiger tcaiger merged commit 2c4e4ea into dev Nov 27, 2024
44 checks passed
@tcaiger tcaiger deleted the rn-249-xname-aka-x-axis-label-not-exporting branch November 27, 2024 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants