This repository has been archived by the owner on Oct 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(QB-24411): add color.altLabel to color definition
- Loading branch information
Showing
4 changed files
with
24 additions
and
2 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
chart-modules/common/picasso/__tests__/advanced-color.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import AdvancedColorer from '../advanced-colorer'; | ||
|
||
describe('advanced-color', () => { | ||
describe('resolveColorByPropertyDef', () => { | ||
test('should set labelExpRef when dimension label is expression', () => { | ||
const properties = { byDimDef: { type: 'expression', label: '=1' } }; | ||
const isDim = true; | ||
const dimensions = [{}]; | ||
const exclDimensions = []; | ||
const measures = {}; | ||
const customLabel = undefined; | ||
AdvancedColorer.resolveColorByPropertyDef(properties, isDim, dimensions, exclDimensions, measures, customLabel); | ||
|
||
console.log(JSON.stringify(dimensions[0])); | ||
|
||
expect(dimensions[0].qAttributeDimensions[0].labelExpRef).toBe('color.altLabel'); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters