From ad46e6ea19db2d7ef1cbdd0b78c31920ecb0e032 Mon Sep 17 00:00:00 2001 From: caele Date: Tue, 11 May 2021 10:10:26 +0200 Subject: [PATCH] chore: fix docs --- docs/embed-configuration.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/embed-configuration.md b/docs/embed-configuration.md index 8034c4395..fc2e2984a 100644 --- a/docs/embed-configuration.md +++ b/docs/embed-configuration.md @@ -89,11 +89,11 @@ import piechart from '@nebula.js/sn-pie-chart'; embed.createConfiguration({ types: [ { - type: 'bar', + name: 'bar', load: () => Promise.resolve(barchart), }, { - type: 'pie', + name: 'pie', load: () => Promise.resolve(piechart), }, ], @@ -125,7 +125,7 @@ You can then configure all types you expect might be used: ```js const types = ['bar', 'line', 'pie', 'sankey'].map((t) => ({ - type: t, + name: t, load: () => loadSnType(t), })); const baseConfig = stardust.embed.createConfiguration({ types }); @@ -135,7 +135,7 @@ The type will be loaded from the remote url the first time you render it: ```js baseConfig(enigmaApp).render({ - type: 'bar', + name: 'bar', fields: ['Product', '=sum(Sales)'], }); ```