Skip to content

Commit

Permalink
Fix vega expressions
Browse files Browse the repository at this point in the history
Signed-off-by: martinRenou <[email protected]>
  • Loading branch information
martinRenou authored and gaborbernat committed Nov 26, 2022
1 parent b398f20 commit 5ced0b3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions js/vegaexpr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ import { MODULE_NAME, MODULE_VERSION } from './version';
// manually create and bind that locale context to the format function.
const locale = vegaFormat.defaultLocale();
const dataflow = { context: { dataflow: { locale: () => locale } } };
vegaFunctions.functionContext.format =
vegaFunctions.functionContext.format.bind(dataflow);
for (const name in vegaFunctions.functionContext) {
vegaFunctions.functionContext[name] =
vegaFunctions.functionContext[name].bind(dataflow);
}

export class VegaExprModel extends WidgetModel {
defaults() {
Expand Down

0 comments on commit 5ced0b3

Please sign in to comment.