From f65e1a164049e08723bc488c2bc770f782832d53 Mon Sep 17 00:00:00 2001 From: welchyd <35077650+welchyd@users.noreply.github.com> Date: Wed, 5 May 2021 16:05:34 -0600 Subject: [PATCH] Update README.md Fix code example --- README.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 3ce4528..bb5f645 100644 --- a/README.md +++ b/README.md @@ -35,14 +35,16 @@ export default { components: { Plotly }, - data:{ - data:[{ - x: [1,2,3,4], - y: [10,15,13,17], - type:"scatter" - }], - layout:{ - title: "My graph" + data() { + return { + data:[{ + x: [1,2,3,4], + y: [10,15,13,17], + type:"scatter" + }], + layout:{ + title: "My graph" + } } } }