49 Commits

Author SHA1 Message Date
83396e2080 StateTimeline: Show error when Time type field has invalid values (#107491) 2025-07-02 08:51:20 -05:00
ee6cbd0efc BarChart/StateTimeline: Use noValue setting for error message when data is empty (#107147)
* fix: use fieldConfig.defaults.noValue in barchart and statetimeline

* change name of test

* remove todo comment

* lean on PanelDataErrorView in the case where no fields are present

* update StateTimeline and StatusHistory to use PanelDataErrorView

* fix test

* self-review cleanup
2025-06-27 08:28:13 -05:00
dcfb079856 StateTimeline: Display false and empty string values (#107059)
* Support boolean false value mappings

* Support empty string value mapping
2025-06-24 12:07:13 -04:00
1e41c07920 StateTimeline: Support NaN and null value mappings (#105638)
* fix(#92944): add StateTimeline Null+NaN handling

* chore: remove console.warns from debugging

* test: initialize a couple of simple tests

* test: more tests for hasMappedNaN and hasMappedNull

* chore: revert some of the let-const syntax cleanup for a later PR

* chore: rename should draw method

* chore: fix comment typo

* refactor(timeline-chart-utils): un-nest hasSpecialMappedValue() helper

* test(timeline-chart-utils): unit test hasSpecialMappedValue() helper

* chore: fix code comment typos in changed files

* refactor(timeline-chart): reduce helper DRY-ness for better performance

* fix(timeline-chart): check Y value for truthiness, not if it is finite

* test(state-timeline): additional gdev test panels with null + NN values

* fix(timeline-chart): allow Y value of zero in checks

---------

Co-authored-by: Jesse David Peterson <jesdavpet@users.noreply.github.com>
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
2025-06-12 15:13:25 -04:00
1ca9910736 Grafana Data: Use package.json exports for internal code (#102696)
* refactor(frontend): rename all @grafana/data/src imports to @grafana/data

* feat(grafana-data): introduce internal entrypoint for sharing code only with grafana

* feat(grafana-data): add test entrypoint for data test utils usage in core

* refactor(frontend): update import paths to use grafana/data exports entrypoints

* docs(grafana-data): update comment in internal/index.ts

* refactor(frontend): prefer public namespaced exports over re-exporting via internal

* chore(frontend): fix a couple more weird paths that typescript complains about
2025-03-25 10:48:36 +01:00
5cd8547131 Revert "Grafana Data: Use package.json exports for internal code (#102286)
Revert "Grafana Data: Use package.json exports for internal code (#102036)"

This reverts commit 91116de790c6c59248abd262721c40f169be6661.
2025-03-17 12:26:59 +00:00
91116de790 Grafana Data: Use package.json exports for internal code (#102036)
* refactor(frontend): rename all @grafana/data/src imports to @grafana/data

* feat(grafana-data): introduce internal entrypoint for sharing code only with grafana

* feat(grafana-data): add test entrypoint for data test utils usage in core

* refactor(frontend): update import paths to use grafana/data exports entrypoints

* docs(grafana-data): update comment in internal/index.ts

* refactor(frontend): prefer public namespaced exports over re-exporting via internal
2025-03-17 11:27:17 +01:00
c9f563e576 Grafana UI: Use package.json exports for internal code (#101815)
* feat(grafana-ui): introduce development exports to prevent importing from grafana/ui/src

* refactor(theme-generation): move theme templates into scripts so themes continue to build

* refactor(frontend): replace  grafana/ui paths that use nested src with /internal or /unstable

* chore(betterer): update better results file

* feat(grafana-ui): support enterprise, remove Text component from internal

* docs(packages): update readme with exporting code conventions
2025-03-12 14:14:32 +01:00
e9d9b15295 StateTimeline / StatusHistory: Add axis visibility and width controls (#98548)
* Allow setting the y axis width

* Add to docs

* Add to status history as well

* Add to status history docs and schema

* Change config to come from generic axis builder

* keep axis

* Change overridden label

* Update docs/sources/panels-visualizations/visualizations/status-history/index.md

Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>

* Update docs/sources/panels-visualizations/visualizations/state-timeline/index.md

Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>

* Remove the category/label override

* Move axis to its own section in docs as well

* clean

* rename to addAxisWidth

* Apply suggestions from code review

Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>

* Move sections to match UI order

* Update docs/sources/shared/visualizations/axis-options-all.md

Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>

* Change other axis options doc to be consistent.

* Fix linter

* add AxisPlacement

* Add new placement option to docs

* change some wording

* Apply suggestions from code review

Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>

---------

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
2025-01-23 12:21:24 -06:00
6e62afa950 StateTimeline: Fix use of hidden fields in data links (#95095)
* Use hideFrom in GraphNG to hide fields if value is defined. Remove other filtering from timeline chart

* make hidefrom logic more robust

* remove unneeded decoupling, filter fields when there are no links

* add omitHideFromViz prop to GraphNG

* Add more to comment on property

---------

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2024-11-26 10:40:25 -06:00
1f9562ea72 State Timeline: Align left text to 0 when rectangle is left-truncated (#94422)
Handle negative x placement with displaying text
2024-10-09 11:24:06 -05:00
d5e35c4b78 Legend: Render legend threshold colors (#92838)
* feat(barchart): render legend threshold and value mapping colors

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2024-09-27 17:02:03 +02:00
01fc31069f StateTimeline: Add pagination support (#89586)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2024-08-08 21:44:17 -05:00
219f4776a2 run prettier 2024-07-23 14:45:54 +01:00
47f8717149 React: Use new JSX transform (#88802)
* update eslint, tsconfig + esbuild to handle new jsx transform

* remove thing that breaks the new jsx transform

* remove react imports

* adjust grafana-icons build

* is this the correct syntax?

* try this

* well this was much easier than expected...

* change grafana-plugin-configs webpack config

* fixes

* fix lockfile

* fix 2 more violations

* use path.resolve instead of require.resolve

* remove react import

* fix react imports

* more fixes

* remove React import

* remove import React from docs

* remove another react import
2024-06-25 12:43:47 +01:00
694499ae6d StateTimeline: Fix bug with state labels using stale y position cache during panel resize (#88818)
* StateTimeline: Check for change in height

* probably it!

---------

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2024-06-07 09:12:25 -07:00
d601acac3a VizTooltips: Remove old tooltips and annotations (#84420)
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
2024-04-02 15:32:46 -05:00
220fea966b CursorSync: Extract EventBus logic into shared plugin (#84111) 2024-03-12 17:15:38 -05:00
57df3b84dc StateTimeline: Treat second time field as state endings (#84130) 2024-03-10 22:11:11 -05:00
42b55aedbc DataLinks: Handle getLinks() regen during data updates and frame joining (#83654) 2024-02-29 21:46:53 +02:00
6e6b9a62a2 VizTooltips: Use global portal (#81986)
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
2024-02-24 00:18:24 +02:00
dbbbfa282d StateTimeline: Properly type tooltip prop, remove ts-ignore (#83189) 2024-02-22 06:14:53 -06:00
16dee3cf1c Alerting: Protect possible undefined (#83128)
Protect possible undefined
2024-02-20 21:17:40 +01:00
94a274635b VizTooltips: Fix series labels after zooming (#82985) 2024-02-17 00:38:13 -06:00
4b67ac117f VizTooltips: Fix sorting (#82278) 2024-02-15 12:54:43 -06:00
930c8c5aa3 EventBus: Add ability to tag events with arbitrary classification meta (#82087) 2024-02-08 16:15:32 -06:00
86cb412b1d Update dependency prettier to v3.2.4 (#81047)
* Update dependency prettier to v3.2.4

* update sdk + run prettier

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2024-01-23 11:41:24 +00:00
11662e18b3 TimelineChart: Fix rendering of small boxes (#72775) (#80420) 2024-01-12 12:59:46 -06:00
7eea30d0e8 VizTooltip: Improved StateTimeline tooltip (#79599)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2023-12-29 17:38:40 -06:00
b3387793f1 Chore: uPlot v1.6.28 (#79732) 2023-12-29 13:43:15 -06:00
bb316a7c24 Status History: Improve tooltip (#76647)
* feat(state-timeline-tooltip): improve status history tooltip

Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2023-11-22 09:55:29 +01:00
ced9fcb94e StatusHistory/StateTimeline: Re-config plot for tooltip mode in panel edit (#77954) 2023-11-09 11:48:39 -06:00
c6e27e00b4 Chore: Move internal GraphNG+Timeseries components into core (#77525)
* move to core where possible

* update imports

* ignore import order for now

* add graveyard files

* update codeowners
2023-11-01 21:59:55 -07:00
0668820259 StateTimeline: Refactor hover markers (#75326) 2023-09-23 05:35:17 +03:00
aadd5bacfa Chore: uPlot v1.6.26 (#75199) 2023-09-22 11:33:39 -05:00
71b841fa9b StatusHistory: Support legend decimals based on field overrides (#72486) 2023-08-01 20:54:56 +02:00
1de35bf3c3 TimeSeries / StateTimeline: Add support for rendering enum fields (#64179)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-07-21 11:38:11 -05:00
34c9faf140 PanelContext: Provide events scope identifier (#71561)
* PanelContext: Provide events scope identifier

* What a console log
2023-07-18 06:27:33 -07:00
37e2becdd7 StatusHistory: Fix rendering of value-mapped null (#69033) 2023-05-25 13:38:32 -05:00
e8ca3c0409 Chore: More typescript improvements 💪 (#68699)
* fix some anys

* some canvas/geomap improvements

* some more panel type fixes

* just omit the type in TagOption
2023-05-22 11:53:58 +01:00
2e7b77a94a StateTimeline: Support hideFrom field config (#68586) 2023-05-16 12:18:35 -07:00
33fd83f7e3 kindsys: Adapt to new PanelCfg schema interface (#65297)
* kindsys: Adapt to new PanelCfg schema interface

* building locally

* Remove Panel prefix in cue files

* Regenerate

* Update imports

* fixup! Merge branch 'remove-panel-prefix' into sdboyer/redundant-panelcfg-prefixes

* Fix formatting

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Tania B <yalyna.ts@gmail.com>
2023-05-15 23:07:54 -04:00
b24ba7b7ae FieldValues: Use plain arrays instead of Vector (part 3 of 2) (#66612)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-04-20 17:59:18 +03:00
09f03e92bf FieldValues: Use simple array in panel visualizations (#66706)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2023-04-17 14:46:29 -07:00
98e66654d6 Chore: Some type fixes needed for react 18 (#65600)
some type fixes needed for react 18
2023-03-30 13:40:18 +01:00
53186c14a4 Chore: Improve some types (#64675)
* some type fixes

* few more

* more type fixes

* fix the majority of (window as any) calls

* don't make new variable for event

* few more

* MOAR
2023-03-14 09:51:44 +00:00
f8d89eff56 Chore: fix type errors in tests (#63270)
* fix any's in tests

* fix more any's in tests

* more test type fixes

* fixing any's in tests part 3

* more test type fixes

* fixing test any's p5

* some tidy up

* fix template_srv
2023-02-14 16:46:42 +01:00
846acd28ff StateTimeline: Show correct legend label when value mappings set (#62282)
* StateTimeline: Show correct legend label when value mappings set

* Add test dashboard for thresholds and value mappings

* run stripnulls.sh
2023-01-27 14:30:42 +02:00
6a93c77082 Refactor state timeline/status history to cue model and refactor TimelineChart component (#61631)
* Adapt state timeline to scuemata

* Refactor status history to cue model

* Refactor

* Refactor TimelineChart as a core component

* wip

* Change as per CR

Co-authored-by: sam boyer <sdboyer@grafana.com>
2023-01-26 07:03:59 +00:00