Skip to content

Extend the charts to show the current time#11348

Merged
offtherailz merged 11 commits intogeosolutions-it:masterfrom
subashtiwari1010:fix/extent-timeline-11326
Jul 23, 2025
Merged

Extend the charts to show the current time#11348
offtherailz merged 11 commits intogeosolutions-it:masterfrom
subashtiwari1010:fix/extent-timeline-11326

Conversation

@subashtiwari1010
Copy link
Copy Markdown
Contributor

@subashtiwari1010 subashtiwari1010 commented Jul 21, 2025

Description

This PR adds the functionality to display the current time in the charts, issue #11326. It adds the checkbox to display the current time in the Axes tab of the charts.
image image

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x", remove the others)

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

Issue

What is the current behavior?
There is no option to add the current time in the chart.
Fixes #11326

What is the new behavior?

1. UI to Show the current time on the axis.
2. When checked, the user can view the current time either single or range on the axis.
3. The user can style the shapes in the chart.
4. When saved, the same feature will be available in the chart widgets too.

Breaking change

Does this PR introduce a breaking change? (check one with "x", remove the other)

  • Yes, and I documented them in migration notes
  • No

Other useful information

@subashtiwari1010 subashtiwari1010 marked this pull request as ready for review July 21, 2025 11:45
Copy link
Copy Markdown
Member

@offtherailz offtherailz left a comment

Choose a reason for hiding this comment

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

The functionality works 👍
Anyway I'd ask you some changes to improve readability and compatibility.

  • Use dependencies. We can not add a parameter on every new dependency. For this reason there is a dependency mapping system and several enhancer that allows to get values for dependencies and update the widget every time it . I'd suggest a "dependenciesToShapes" enhancer that checks timeRange dependency (the flag and it s settings, to draw the shapes on the chart).
  • Name not simply range but timeRange
  • Maybe it is the case to allow to select also the style of the line, when checked (size, dash style and color).

Copy link
Copy Markdown
Member

@offtherailz offtherailz left a comment

Choose a reason for hiding this comment

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

  • For options and labels, instead of spread generic shapeColor, shapeSize, shapeStyle, use an object currentTimeOpts: {style, size, color} or we can confuse with other shapes.
  • For labels, shape style etc... is confusing. I suggest to use color, style and size, and group them, something like this shold work
Image

final effect (replace labels with simply "Color" "Style" and "Size"
Image

@offtherailz offtherailz added this to the 2025.02.00 milestone Jul 22, 2025
@offtherailz offtherailz merged commit 4a95af4 into geosolutions-it:master Jul 23, 2025
9 of 10 checks passed
@offtherailz
Copy link
Copy Markdown
Member

@ElenaGallo, could you please test this on DEV ? Thank you

@ElenaGallo
Copy link
Copy Markdown
Contributor

@subashtiwari1010 When the "Show the current time on the axis" option is enabled, the highlighted date on the timeline is January 1st, 2021 instead of the current date.

Used this map for testing.

bgvf

@subashtiwari1010 subashtiwari1010 deleted the fix/extent-timeline-11326 branch July 24, 2025 10:14
@offtherailz
Copy link
Copy Markdown
Member

offtherailz commented Jul 24, 2025

Hi @ElenaGallo , current time looks to be January 1st, 2021 in the map you provided:

image

and the layer looks to contain some data for the given value.

image

So it looks ok to me

ale-cristofori pushed a commit that referenced this pull request Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extend the charts to show the current time

3 participants