Skip to content

Commit

Permalink
Merge pull request #46 from perses/antoinethebaud/timeserieschart-adj…
Browse files Browse the repository at this point in the history
…ust-migrate

[IGNORE] TimeSeriesChart: mystery fix for perses/perses migration unit tests
  • Loading branch information
AntoineThebaud authored Feb 7, 2025
2 parents ec9ff33 + 3f24d98 commit 5a5b3cd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion TimeSeriesChart/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@perses-dev/timeseries-chart",
"private": true,
"version": "0.4.1",
"version": "0.4.2",
"scripts": {
"dev": "rsbuild dev",
"build": "rsbuild build",
Expand Down
14 changes: 9 additions & 5 deletions TimeSeriesChart/schemas/migrate/migrate.cue
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,15 @@ spec: {
// visual
#lineWidth: *#panel.fieldConfig.defaults.custom.lineWidth | null
if #lineWidth != null {
visual: lineWidth: [// switch
if #lineWidth > 3 {3}, // line width can't go beyond 3 in Perses
if #lineWidth < 0.25 {0.25}, // line width can't go below 0.25 in Perses
#lineWidth,
][0]
if #lineWidth > 3 {
visual: lineWidth: 3 // line width can't go beyond 3 in Perses
}
if #lineWidth < 0.25 {
visual: lineWidth: 0.25 // line width can't go below 0.25 in Perses
}
if #lineWidth >= 0.25 && #lineWidth <= 3 {
visual: lineWidth: #lineWidth
}
}

#fillOpacity: *#panel.fieldConfig.defaults.custom.fillOpacity | null
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5a5b3cd

Please sign in to comment.