-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #443 from deneb-viz/bugfix/erroneous-config
fix: correct config for inbuilt templates (#434)
- Loading branch information
Showing
12 changed files
with
61 additions
and
48 deletions.
There are no files selected for viewing
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
19 changes: 10 additions & 9 deletions
19
src/features/template/included/vega-lite/vl-empty-config.ts
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 |
---|---|---|
@@ -1,17 +1,18 @@ | ||
import { Config, TopLevelSpec } from 'vega-lite'; | ||
import { TopLevelSpec } from 'vega-lite'; | ||
|
||
import { VEGA_LITE_SCHEMA_URL } from '.'; | ||
import { VEGA_LITE_SCHEMA_URL, getTemplatePowerBiConfigVl } from '.'; | ||
import { getDenebTemplateDatasetRef, getNewIncludedTemplateMetadata } from '..'; | ||
import { powerbiTheme } from '../../../vega-extensibility/extensibility/powerbi-theme'; | ||
|
||
export const vlEmptyConfig = (): TopLevelSpec => ({ | ||
$schema: VEGA_LITE_SCHEMA_URL, | ||
data: getDenebTemplateDatasetRef(), | ||
config: { ...powerbiTheme() } as Config, | ||
layer: [], | ||
usermeta: getNewIncludedTemplateMetadata( | ||
'vegaLite', | ||
'[empty (with Power BI theming)]', | ||
'Bare-minimum Vega-Lite template, with data-binding pre-populated. Contains configuration defaults for marks and axes to provide a Power BI-like look and feel.' | ||
) | ||
usermeta: { | ||
...getNewIncludedTemplateMetadata( | ||
'vegaLite', | ||
'[empty (with Power BI theming)]', | ||
'Bare-minimum Vega-Lite template, with data-binding pre-populated. Contains configuration defaults for marks and axes to provide a Power BI-like look and feel.' | ||
), | ||
config: getTemplatePowerBiConfigVl() | ||
} | ||
}); |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,22 @@ | ||
import { Config, Spec } from 'vega'; | ||
import { Spec } from 'vega'; | ||
|
||
import { getDenebTemplateVegaDatasetRef, VEGA_SCHEMA_URL } from '.'; | ||
import { | ||
getDenebTemplateVegaDatasetRef, | ||
getDenebTemplateVegaSpecificConfig, | ||
VEGA_SCHEMA_URL | ||
} from '.'; | ||
import { getNewIncludedTemplateMetadata } from '..'; | ||
import { powerBiThemeVega } from '../../../vega-extensibility/extensibility/powerbi-theme'; | ||
|
||
export const vEmptyConfig = (): Spec => ({ | ||
$schema: VEGA_SCHEMA_URL, | ||
data: getDenebTemplateVegaDatasetRef(), | ||
config: { ...powerBiThemeVega() } as Config, | ||
marks: [], | ||
usermeta: getNewIncludedTemplateMetadata( | ||
'vega', | ||
'[empty (with Power BI theming)]', | ||
'Bare-minimum Vega template, with data-binding pre-populated. Contains configuration defaults for marks and axes to provide a Power BI-like look and feel.' | ||
) | ||
usermeta: { | ||
...getNewIncludedTemplateMetadata( | ||
'vega', | ||
'[empty (with Power BI theming)]', | ||
'Bare-minimum Vega template, with data-binding pre-populated. Contains configuration defaults for marks and axes to provide a Power BI-like look and feel.' | ||
), | ||
config: getDenebTemplateVegaSpecificConfig(true) | ||
} | ||
}); |
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 |
---|---|---|
@@ -1,16 +1,22 @@ | ||
import { Spec } from 'vega'; | ||
|
||
import { getDenebTemplateVegaDatasetRef, VEGA_SCHEMA_URL } from '.'; | ||
import { | ||
getDenebTemplateVegaDatasetRef, | ||
getDenebTemplateVegaSpecificConfig, | ||
VEGA_SCHEMA_URL | ||
} from '.'; | ||
import { getNewIncludedTemplateMetadata } from '..'; | ||
|
||
export const vEmpty = (): Spec => ({ | ||
$schema: VEGA_SCHEMA_URL, | ||
data: getDenebTemplateVegaDatasetRef(), | ||
config: {}, | ||
marks: [], | ||
usermeta: getNewIncludedTemplateMetadata( | ||
'vega', | ||
'[empty]', | ||
'Bare-minimum Vega template, with data-binding pre-populated. Has no additional configuration for styling.' | ||
) | ||
usermeta: { | ||
...getNewIncludedTemplateMetadata( | ||
'vega', | ||
'[empty]', | ||
'Bare-minimum Vega template, with data-binding pre-populated. Has no additional configuration for styling.' | ||
), | ||
config: getDenebTemplateVegaSpecificConfig() | ||
} | ||
}); |
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