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

Format and Formula support for counter widget #9071

Closed
1 of 6 tasks
tdipisa opened this issue Apr 4, 2023 · 2 comments · Fixed by #9536 or #9612
Closed
1 of 6 tasks

Format and Formula support for counter widget #9071

tdipisa opened this issue Apr 4, 2023 · 2 comments · Fixed by #9536 or #9612

Comments

@tdipisa
Copy link
Member

tdipisa commented Apr 4, 2023

Description

The support for Format and Formula adv. options should be included also for Counter widgets.

image

What kind of improvement you want to add? (check one with "x", remove the others)

  • Minor changes to existing features
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

Other useful information

@tdipisa tdipisa self-assigned this Apr 4, 2023
@tdipisa tdipisa changed the title Format and Formula support for counter widget Advanced options support for counter widget Apr 4, 2023
@tdipisa tdipisa changed the title Advanced options support for counter widget Format and Formula support for counter widget Apr 4, 2023
@tdipisa tdipisa assigned MV88 and unassigned tdipisa Aug 21, 2023
@tdipisa tdipisa added this to the 2024.01.00 milestone Aug 21, 2023
@MV88
Copy link
Contributor

MV88 commented Sep 29, 2023

@tdipisa @offtherailz please clarify

by checking the current implementation i noticed that:

* @prop {object} [yAxisOpts] options for yAxis: `type`, `tickPrefix`, `tickPostfix`, `format`, `formula`
* @prop {string} [yAxisOpts.type] determine the type of the y axis of `date`, `-` (automatic), `log`, `linear`, `category`, `date`.
* @prop {string} [yAxisOpts.format] format for y axis value. See {@link https://d3-wiki.readthedocs.io/zh_CN/master/Formatting/}
* @prop {string} [yAxisOpts.tickPrefix] the prefix on y value
* @prop {string} [yAxisOpts.tickSuffix] the suffix of y value.

  • But here is requested to add this to the counter. I think what you want here is to manipulate the value of the counter by adding a prefix suffix or using a formula on top of it.
  • Also what about the unit of measure currently applied to the value that act as a suffix
    do we have to remove it and "include it" in the format part?
    image

for example that fields makes sense on widget bar chart because they are applied to the y axis
image

this could be a result of adding prefix and suffix
image

@MV88
Copy link
Contributor

MV88 commented Oct 2, 2023

As agreed we are going to apply those advanced settings to the value of the counter,
this should be stored in a different section of the data of the widget,
since they are not referring to the yAxisOpts as they affect directly value

MV88 added a commit to MV88/MapStore2 that referenced this issue Oct 2, 2023
dsuren1 pushed a commit that referenced this issue Oct 5, 2023
* #9071 add advanced options to coutner widgets

* fix retrocompatibility issue with uom
@ElenaGallo ElenaGallo self-assigned this Oct 9, 2023
MV88 added a commit to MV88/MapStore2 that referenced this issue Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment