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

WIP/GraphNG: support soft min max axis #30238

Closed
wants to merge 16 commits into from
Closed

WIP/GraphNG: support soft min max axis #30238

wants to merge 16 commits into from

Conversation

ryantxu
Copy link
Member

@ryantxu ryantxu commented Jan 12, 2021

Fixes #979

Status: this is currently just the settings scaffolding and does not implement the actual scaling

This adds an axis mode option:
image

TODO:

  • words! what language makes sense?
  • implement the auto scalling

@leeoniya
Copy link
Contributor

leeoniya commented Jan 12, 2021

i can land the remainder by the end of this week.

should the JSON store the full config (rather than a unary value), so we have more flexibility to expose more subtle behavior in the future?

https://github.com/leeoniya/uPlot/blob/e870fc16cef352fb283a050957ec08374e21a47f/dist/uPlot.d.ts#L218-L235

@leeoniya
Copy link
Contributor

another option supports both hard limits (clamping) and soft limits by using the Min/Max from "Standard options" for hard, and adds Axis > SoftMin and Axis > SoftMax numeric fields to the "Time series options" for the soft limits.

The soft limits will be inside the hard limits. The scale/axis range will start at the soft limits and expand to the hard limits when the data exceeds the softs, and will clip afterwards.

image

@torkelo
Copy link
Member

torkelo commented Jan 13, 2021

should the JSON store the full config (rather than a unary value), so we have more flexibility to expose more subtle behavior in the future?

I am not sure that is a good idea, then we have to support that more complex model forever. The simpler the persisted model, the easier for us to change this & improve defaults.

@torkelo
Copy link
Member

torkelo commented Jan 13, 2021

I like this Axis min & max mode approach, only one new setting needed.

@leeoniya
Copy link
Contributor

leeoniya commented Jan 13, 2021

@torkelo please read the recent comments onwards from #979 (comment)

i think they're valid concerns, and the there's quite a lot of added flexibility gained from having 2 numeric fields instead of a toggle that neuters/repurposes clamping ability. i'm not sure of another way to accommodate spike-chopping in a softMin/max scenario if you cannot set hard limits as well.

@torkelo
Copy link
Member

torkelo commented Jan 13, 2021

@leeoniya yea, maybe your right that separate soft min & max options would allow hard limits. Wish we could hide some of these advanced options so they are not always expanded/visible (to not overwhelm new users)

@dprokop
Copy link
Member

dprokop commented Jan 13, 2021

@leeoniya yea, maybe your right that separate soft min & max options would allow hard limits. Wish we could hide some of these advanced options so they are not always expanded/visible (to not overwhelm new users)

@torkelo I was thinking along the same lines about this. I assume when we talk about the advanced options we consider the soft min/max numeric fields. I find the pattern we use for the axis scales something that could fit this use case as well when the numeric inputs are only shown when the soft mode is selected:

image

@torkelo
Copy link
Member

torkelo commented Jan 13, 2021

@dprokop but that would still require an always present soft mode option, and what would soft mode mean if you have not specified any values in the inputs? feels better to have soft min & soft max inputs but hide them & axis width, (and other future advanced options) in an advanced section or something :)

mjseaman and others added 15 commits January 13, 2021 15:33
* Add sigv4 overview and links to AWS docs

* minor wording tweak

* Update prometheus.md

* move supported version in Prometheus-AMP docs

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

* move supported version

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

* move version support note

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
…ed to panels are off causing data points to be cut off (outside) (#30227)

* runRequest: Fixes issue with request time range and time range returned to panels are off causing data points to be cut off (outside)

* Updated test
* QueryMetricsV2: Stream response

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* API: Use jsoniter instead of standard JSON package

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* get meta data from dataframe meta

* gmdMeta is not used anymore

* wip: move deep link creation to backend

* Refactor backend. Remove not used front end code

* Unit test deep links. Remove not used frontend tests

* remove reference to gmdmeta

* fix goimports error

* fixed after pr feedback

* more changes according to pr feedback

* fix lint issue

* fix bad math expression check and fix bad test

* Decrease nesting

* put link on first data field only
- also add Get by UID+OrgID to datasource cache
- Refactor backend commands for Delete and Get to be unified
Example `ec2_instance_attribute(default, InstanceId, { 'tag:Environment': ['production'] });` will cause `SyntaxError: Unexpected token ' in JSON at position 2`
* Update prometheus.md

* Update docs/sources/datasources/prometheus.md

Co-authored-by: Dan Cech <dcech@grafana.com>

* Update prometheus.md

Co-authored-by: Dan Cech <dcech@grafana.com>
@leeoniya
Copy link
Contributor

superseded by #30326.

@leeoniya leeoniya closed this Jan 16, 2021
@ryantxu ryantxu deleted the soft-minmax-mode branch March 5, 2021 00:34
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.

Graph: Limits on Y auto scale (min max)