49 Commits

Author SHA1 Message Date
76b05b80a4 Legend: Sort by name (#69490) 2023-06-06 15:16:16 -05: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
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
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
2a34293689 Chore: more type fixes (#62952)
* fix some more any/type assertions

* more any/type assertion fixes

* implement review comments
2023-02-09 09:03:13 +00:00
ab7a4e5f28 Fix Barchart legend calcs when stacking is percent (#61449)
* Fix Barchart legend calcs when stacking is percent

* doc change

* Refactor + tests
2023-01-26 11:34:57 +02:00
48b620231e Kindsys: Unique names for composable kind TS types (#61928)
* Kindsys: Unique names for composable kind TS types

* Update all TS imports
2023-01-23 18:03:44 +00:00
2cf628e37a BarChart: Highlight bars option for easier interaction (#60530)
* Add bar highlighter plugin to BarChart

* refactor feature

* Horizontal bars can also be hovered

* Tooltip mode UI reflects settings when stacked and bar highlight toggled

* rename variables

* override tooltip option + zIndex on hover box

* change option desc and simplify condition
2023-01-11 10:30:01 +02:00
122f0d947e BarChart: when horiz, allow rotation and skipping of y tick labels (#59354) 2022-11-29 21:46:39 -05:00
778337e522 BarChart: Fix coloring from thresholds and value mappings (#58285) 2022-11-10 07:43:32 -06:00
0640eeef0a Number formatting: only 0-trim decimals in y axis ticks. omit currency, locale units. (#57386) 2022-10-21 21:35:29 -06:00
da39c7297b BarChart: use dashboard timezone for x axis (#57047) 2022-10-17 14:06:45 +07:00
16c9c858b8 BarChart: add negY transform to fieldConfig overrides (#55930) 2022-09-28 14:32:37 -06:00
ea5e58a051 BarChart/PieChart: create/update models.cue (#52988)
* Reverse engineering barchart models.cue from models.gen.ts

* Barchart models.cue and import fixes

* Add models.cue for piechart

* Use single-item syntax to dodge cuetsy bug

* Add some docs

Co-authored-by: sam boyer <sdboyer@grafana.com>
2022-08-18 14:46:36 +02:00
7c40257baf BarChart: fix top y tick clipping when x labels are rotated (#52964) 2022-07-28 16:51:37 -05:00
8ee0555bac TimeSeries: Implement auto decimals for y axes (#52912) 2022-07-28 02:58:42 -04:00
d122449a97 BarChart: fix explicit yAxis min (#51768) 2022-07-06 06:47:49 -06:00
24bdda72fb Barchart: Fix warning not showing (#51190) 2022-06-21 17:45:37 -05:00
3c6e0e8ef8 Chore: ESlint import order (#44959)
* Add and configure eslint-plugin-import

* Fix the lint:ts npm command

* Autofix + prettier all the files

* Manually fix remaining files

* Move jquery code in jest-setup to external file to safely reorder imports

* Resolve issue caused by circular dependencies within Prometheus

* Update .betterer.results

* Fix missing // @ts-ignore

* ignore iconBundle.ts

* Fix missing // @ts-ignore
2022-04-22 14:33:13 +01:00
aa98123e72 TimeSeries: always try to detect & fix reverse-sorted time field (#47906) 2022-04-19 23:20:09 -05:00
dfdfe3f428 TimeSeries & BarChart: refactor stacking (#47373)
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-04-13 10:29:03 -05:00
b3b1f945b0 BarChart: fix excessive re-renders during mousemove and panel resize (#45027)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-02-08 16:32:23 -06:00
0a5771ee6b TimeSeries/BarChart/XYChart: Allow hiding x axis (#44107)
* TimeSeries/BarChart/XYChart: Allow hiding x axis

* Update public/app/plugins/panel/barchart/utils.ts

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>

* Migrations

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2022-01-20 00:38:32 -08:00
e75edc810d BarChart: color by field, x time field, bar radius, label skipping (#43257)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-12-23 10:04:41 -08:00
33c64dba38 BarChart: support log scale (#43305) 2021-12-18 11:21:22 -08:00
dd247f26de BarChart: refactor x tick label placement logic (#43256) 2021-12-17 11:35:09 -06:00
8fdbc6cc20 TimeSeries: don't auto-disable fill of fillBelowTo targets (#43165) 2021-12-16 14:52:47 -06:00
8828d5e8d7 BarChart: Use new data error view component to show actions in panel edit (#42474) 2021-12-08 11:45:56 +01:00
6fe29dda33 Barchart docs and styling fix (#41362)
* Barchart docs and styling fix

* Fix name of max length

* rename valueRotation -> xTickLabelRotation

also limits slider padding on sliders without marks
2021-11-12 15:03:19 +01:00
f0a108afb3 MarketTrend: add new alpha panel (#40909) 2021-11-05 18:01:26 -07:00
b82797d1b0 BarChart: rotate barchart x axis labels (#40299)
* GraphNG: add axes label rotation property

* Adds rotation option and adds padding to avoid clipping labels

* Slider: Enable slider marks display (#41275)

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-11-04 10:59:15 +01:00
43bd32206f Barchart/Time series: Allow x axis label (#41142) 2021-11-03 09:42:07 +01:00
e6d2324516 Time series/Bar chart panel: Add ability to sort series via legend (#40226)
* Make legend sorting work in Time series panel

* Import from schema

Add properties to the cue schema as well

* Order stacking

* Add tests for orderIdsByCalcs

* Add check for legend options

* Fix cue schema

* UI fixes

* Order bars as well in barchart

* Use different index when ordered

* Legend sort series doc

* Fix nits

* Update docs/sources/panels/legend-options.md

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>

* Fix linting

* Apply suggestions from code review

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>

* Update docs/sources/panels/legend-options.md

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
2021-10-25 11:21:51 +02:00
29e8728ef0 BarChart: Fix field enumeration for bar value display and legend items (#39308) 2021-09-17 09:57:57 -05:00
fb091de2c7 BarChart: Fix legend and tooltip colors off by 1 after data refresh (#39234) 2021-09-15 13:10:26 -05:00
df6b6e7a98 BarChart: fix stale bar values and x axis labels (#39188) 2021-09-14 12:16:43 -05:00
b248c119ef TimeSeries: Use graph min/max for percentage threshold (#38528)
* TimeSeries: Use graph min/max as baseis for percentage threshold calculation.

* respect hard and soft axis limits for % threshold steps

* revert state-timeline changes

* enable by-threshold coloring in histogram and barchart

* revert yMin

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-08-29 15:46:17 -05:00
1be53b4f3b TimeSeries: Add per-axis grid visibility toggle (#38502)
* Allow grid lines visibility control to XYChart and TimeSeries

* Move grid lines config to field config (axis)

* Fix merge

* Auto grid mode

* Fix ts

* Align naming

* Update packages/grafana-ui/src/components/uPlot/config/UPlotConfigBuilder.test.ts

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>

* Update packages/grafana-ui/src/components/uPlot/config/UPlotConfigBuilder.test.ts

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>

* remove 'grid' from props diff array since field.config.custom.* is handled by structureRev diffing

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-08-27 12:30:42 -05:00
fcceb5716d Schema: move existing grafana/ui models into schema (#38469) 2021-08-24 08:22:34 -07:00
8b80d2256d GraphNG: stack by % (#37127) 2021-07-28 20:31:07 -05:00
8d06aaaf09 BarChart: support stacking options (#37083)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-07-21 23:07:50 -07:00
40a87a7851 BarChart: use uPlot's native bars pathbuilder (#36725) 2021-07-22 00:50:59 +02:00
60f5865ee2 GraphNG: Handle infinite numbers as nulls when converting to plot array (#35638) 2021-06-15 15:00:09 -05:00
7359ba44d0 Timeline/Status grid panel: Add tooltip support (#35005)
* Timeline/Status grid tooltip support first pass

* Tooltips workin

* Use getValueFormat to get the duration

* Separate boxes highlight from tooltip interpolation

* Separate state timeline tooltip component, rely on field display color to retrieve color of series

* create an onHover/onLeave API and optimize implementation

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-06-02 21:43:47 -05:00
573d7b8893 GraphNG: Remove fieldName and hideInLegend properties from UPlotSeriesBuilder (#34901)
* Remove fieldName and hideInLegend properties from UPlotSeriesBuilder

* Fix test
2021-05-31 09:27:57 +02:00
3fd006604f BarChart: hide cursor crosshair (#34862) 2021-05-27 23:18:15 -05:00
a2cbbe1b8a BarChart: value label sizing (#34229)
* Bar chart label positioning and sizing

* Dev dashbard

* Improve autosizing

* Remove sync option

* Unify text sizing options between stat-ish visualizations and bar chart

* Add simple categorical data scenario and update dev dashboard

* Remove unused options builder

* Add docs annotations

* Fix go lint
2021-05-19 17:33:56 +02:00
2ded2aef71 BarChart: enable series toggling via legend (#33955)
* Adds support for Tooltip in BarChartPanel

* Revert some formatting

* Remove BarChart story

* BarChart: move visualization to core

* BarChart: enable series toggling via legend

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-05-11 21:40:04 +02:00
17305ccda3 Barchart: move viz to core (#33947)
* Adds support for Tooltip in BarChartPanel

* Revert some formatting

* Remove BarChart story

* BarChart: move visualization to core

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-05-11 20:57:52 +02:00