I have in my flow amcharts demo charts code both DB1 and DB2 template nodes.
I cant get showing chart in DB2.
Any help?
DB1
[
{
"id": "7cfbf307c75b7796",
"type": "tab",
"label": "DB1",
"disabled": false,
"info": "",
"env": []
},
{
"id": "120ce856b7c5535c",
"type": "ui_template",
"z": "7cfbf307c75b7796",
"group": "5c6d2861d8397c48",
"name": "",
"order": 1,
"width": "12",
"height": "6",
"format": "<script src=\"https://cdn.amcharts.com/lib/5/index.js\"></script>\n<script src=\"https://cdn.amcharts.com/lib/5/xy.js\"></script>\n<script src=\"https://cdn.amcharts.com/lib/5/plugins/exporting.js\"></script>\n<script src=\"https://cdn.amcharts.com/lib/5/themes/Animated.js\"></script>\n<div id=\"chartdiv\"></div>\n<script>\nvar root = am5.Root.new(\"chartdiv\");\nroot.setThemes([am5themes_Animated.new(root)]);\n\nvar data = [\n { date: \"2012-01-01\", value: 8 },\n { date: \"2012-01-02\", value: 10 },\n { date: \"2012-01-03\", value: 12 },\n { date: \"2012-01-04\", value: 14 },\n { date: \"2012-01-05\", value: 11 },\n { date: \"2012-01-06\", value: 6 },\n { date: \"2012-01-07\", value: 7 },\n { date: \"2012-01-08\", value: 9 },\n { date: \"2012-01-09\", value: 13 },\n { date: \"2012-01-10\", value: 15 },\n { date: \"2012-01-11\", value: 19 },\n { date: \"2012-01-12\", value: 21 },\n { date: \"2012-01-13\", value: 22 },\n { date: \"2012-01-14\", value: 20 },\n { date: \"2012-01-15\", value: 18 },\n { date: \"2012-01-16\", value: 14 },\n { date: \"2012-01-17\", value: 16 },\n { date: \"2012-01-18\", value: 18 },\n { date: \"2012-01-19\", value: 17 },\n { date: \"2012-01-20\", value: 15 },\n { date: \"2012-01-21\", value: 12 },\n { date: \"2012-01-22\", value: 10 },\n { date: \"2012-01-23\", value: 8 }\n];\n\nvar chart = root.container.children.push(\n am5xy.XYChart.new(root, {\n focusable: true,\n panX: true,\n panY: true,\n wheelX: \"panX\",\n wheelY: \"zoomX\"\n })\n);\n\nvar easing = am5.ease.linear;\n\nvar xAxis = chart.xAxes.push(\n am5xy.DateAxis.new(root, {\n maxDeviation: 0.1,\n groupData: false,\n baseInterval: {\n timeUnit: \"day\",\n count: 1\n },\n renderer: am5xy.AxisRendererX.new(root, {\n minGridDistance: 50\n }),\n tooltip: am5.Tooltip.new(root, {\n themeTags: [\"axis\"],\n animationDuration: 300\n })\n })\n);\n\nvar yAxis = chart.yAxes.push(\n am5xy.ValueAxis.new(root, {\n maxDeviation: 0.1,\n renderer: am5xy.AxisRendererY.new(root, {})\n })\n);\n\nvar series = chart.series.push(\n am5xy.LineSeries.new(root, {\n minBulletDistance: 10,\n xAxis: xAxis,\n yAxis: yAxis,\n valueYField: \"value\",\n valueXField: \"date\"\n })\n);\n\nseries.data.processor = am5.DataProcessor.new(root, {\n dateFormat: \"yyyy-MM-dd\",\n dateFields: [\"date\"]\n});\n\nseries.data.setAll(data);\n\nvar tooltip = am5.Tooltip.new(root, {\n pointerOrientation: \"horizontal\"\n});\ntooltip.label.set(\"text\", \"{valueY}\");\nseries.set(\"tooltip\", tooltip);\n\nseries.bullets.push(function () {\n return am5.Bullet.new(root, {\n sprite: am5.Circle.new(root, {\n radius: 5,\n fill: series.get(\"fill\"),\n stroke: root.interfaceColors.get(\"background\"),\n strokeWidth: 2\n })\n });\n});\n\nvar cursor = chart.set(\n \"cursor\",\n am5xy.XYCursor.new(root, {\n xAxis: xAxis\n })\n);\ncursor.lineY.set(\"visible\", false);\n\nseries.appear(1000, 100);\nchart.appear(1000, 100);\n\nvar exporting = am5plugins_exporting.Exporting.new(root, {\n menu: am5plugins_exporting.ExportingMenu.new(root, {})\n});\n\nvar annotator = am5plugins_exporting.Annotator.new(root, {});\n\nvar menuitems = exporting.get(\"menu\").get(\"items\");\n\nmenuitems.push({\n type: \"separator\"\n});\n\nmenuitems.push({\n type: \"custom\",\n label: \"Annotate\",\n callback: function() {\n this.close();\n annotator.toggle();\n }\n});\n</script>\n<style>\n#chartdiv {\nwidth: 100%;\nheight: 85vh;\n}\n</style>",
"storeOutMessages": true,
"fwdInMessages": true,
"resendOnRefresh": true,
"templateScope": "local",
"className": "",
"x": 460,
"y": 80,
"wires": [
[]
]
},
{
"id": "70fda6a3a9651913",
"type": "comment",
"z": "7cfbf307c75b7796",
"name": "Dashboard 1",
"info": "",
"x": 470,
"y": 40,
"wires": []
},
{
"id": "5c6d2861d8397c48",
"type": "ui_group",
"name": "koe",
"tab": "910b730f79abe6a0",
"order": 1,
"disp": false,
"width": "26",
"collapse": false,
"className": ""
},
{
"id": "910b730f79abe6a0",
"type": "ui_tab",
"name": "testi",
"icon": "dashboard",
"disabled": false,
"hidden": false
}
]
DB2
[
{
"id": "122e3e07469bfdd0",
"type": "tab",
"label": "DB2",
"disabled": false,
"info": "",
"env": []
},
{
"id": "2133592f6cdae9e4",
"type": "comment",
"z": "122e3e07469bfdd0",
"name": "Dashboard 2",
"info": "",
"x": 390,
"y": 80,
"wires": []
},
{
"id": "e5f9da6312dd4664",
"type": "ui-template",
"z": "122e3e07469bfdd0",
"group": "",
"page": "a916073c7fc38435",
"ui": "",
"name": "",
"order": 1,
"width": "12",
"height": "6",
"head": "",
"format": "<script src=\"https://cdn.amcharts.com/lib/5/index.js\"></script>\n<script src=\"https://cdn.amcharts.com/lib/5/xy.js\"></script>\n<script src=\"https://cdn.amcharts.com/lib/5/plugins/exporting.js\"></script>\n<script src=\"https://cdn.amcharts.com/lib/5/themes/Animated.js\"></script>\n<div id=\"chartdiv\"></div>\n<script>\nvar root = am5.Root.new(\"chartdiv\");\nroot.setThemes([am5themes_Animated.new(root)]);\n\nvar data = [\n { date: \"2012-01-01\", value: 8 },\n { date: \"2012-01-02\", value: 10 },\n { date: \"2012-01-03\", value: 12 },\n { date: \"2012-01-04\", value: 14 },\n { date: \"2012-01-05\", value: 11 },\n { date: \"2012-01-06\", value: 6 },\n { date: \"2012-01-07\", value: 7 },\n { date: \"2012-01-08\", value: 9 },\n { date: \"2012-01-09\", value: 13 },\n { date: \"2012-01-10\", value: 15 },\n { date: \"2012-01-11\", value: 19 },\n { date: \"2012-01-12\", value: 21 },\n { date: \"2012-01-13\", value: 22 },\n { date: \"2012-01-14\", value: 20 },\n { date: \"2012-01-15\", value: 18 },\n { date: \"2012-01-16\", value: 14 },\n { date: \"2012-01-17\", value: 16 },\n { date: \"2012-01-18\", value: 18 },\n { date: \"2012-01-19\", value: 17 },\n { date: \"2012-01-20\", value: 15 },\n { date: \"2012-01-21\", value: 12 },\n { date: \"2012-01-22\", value: 10 },\n { date: \"2012-01-23\", value: 8 }\n];\n\nvar chart = root.container.children.push(\n am5xy.XYChart.new(root, {\n focusable: true,\n panX: true,\n panY: true,\n wheelX: \"panX\",\n wheelY: \"zoomX\"\n })\n);\n\nvar easing = am5.ease.linear;\n\nvar xAxis = chart.xAxes.push(\n am5xy.DateAxis.new(root, {\n maxDeviation: 0.1,\n groupData: false,\n baseInterval: {\n timeUnit: \"day\",\n count: 1\n },\n renderer: am5xy.AxisRendererX.new(root, {\n minGridDistance: 50\n }),\n tooltip: am5.Tooltip.new(root, {\n themeTags: [\"axis\"],\n animationDuration: 300\n })\n })\n);\n\nvar yAxis = chart.yAxes.push(\n am5xy.ValueAxis.new(root, {\n maxDeviation: 0.1,\n renderer: am5xy.AxisRendererY.new(root, {})\n })\n);\n\nvar series = chart.series.push(\n am5xy.LineSeries.new(root, {\n minBulletDistance: 10,\n xAxis: xAxis,\n yAxis: yAxis,\n valueYField: \"value\",\n valueXField: \"date\"\n })\n);\n\n\nseries.data.processor = am5.DataProcessor.new(root, {\n dateFormat: \"yyyy-MM-dd\",\n dateFields: [\"date\"]\n});\n\nseries.data.setAll(data);\n\nvar tooltip = am5.Tooltip.new(root, {\n pointerOrientation: \"horizontal\"\n});\ntooltip.label.set(\"text\", \"{valueY}\");\nseries.set(\"tooltip\", tooltip);\n\nseries.bullets.push(function () {\n return am5.Bullet.new(root, {\n sprite: am5.Circle.new(root, {\n radius: 5,\n fill: series.get(\"fill\"),\n stroke: root.interfaceColors.get(\"background\"),\n strokeWidth: 2\n })\n });\n});\n\n\nvar cursor = chart.set(\n \"cursor\",\n am5xy.XYCursor.new(root, {\n xAxis: xAxis\n })\n);\ncursor.lineY.set(\"visible\", false);\n\n// Make stuff animate on load\n// https://www.amcharts.com/docs/v5/concepts/animations/\nseries.appear(1000, 100);\nchart.appear(1000, 100);\n\n// Set up export and annotation\nvar exporting = am5plugins_exporting.Exporting.new(root, {\n menu: am5plugins_exporting.ExportingMenu.new(root, {})\n});\n\nvar annotator = am5plugins_exporting.Annotator.new(root, {});\n\nvar menuitems = exporting.get(\"menu\").get(\"items\");\n\nmenuitems.push({\n type: \"separator\"\n});\n\nmenuitems.push({\n type: \"custom\",\n label: \"Annotate\",\n callback: function() {\n this.close();\n annotator.toggle();\n }\n});\n</script>\n<style>\n#chartdiv {\nwidth: 100%;\nheight: 85vh;\n}\n</style>\n",
"storeOutMessages": true,
"passthru": true,
"resendOnRefresh": true,
"templateScope": "widget:page",
"className": "",
"x": 380,
"y": 120,
"wires": [
[]
]
},
{
"id": "a916073c7fc38435",
"type": "ui-page",
"name": "kaavio",
"ui": "00b764fcfa23ed43",
"path": "/page1",
"icon": "home",
"layout": "grid",
"theme": "866053e98035ab1d",
"order": 1,
"className": "",
"visible": true,
"disabled": "false"
},
{
"id": "00b764fcfa23ed43",
"type": "ui-base",
"name": "testi",
"path": "/dashboard",
"includeClientData": true,
"acceptsClientConfig": [
"ui-notification",
"ui-control"
],
"showPathInSidebar": false,
"navigationStyle": "default",
"titleBarStyle": "default"
},
{
"id": "866053e98035ab1d",
"type": "ui-theme",
"name": "Theme Name",
"colors": {
"surface": "#ffffff",
"primary": "#0094ce",
"bgPage": "#ffffff",
"groupBg": "#9a9393",
"groupOutline": "#cccccc"
},
"sizes": {
"pagePadding": "12px",
"groupGap": "12px",
"groupBorderRadius": "4px",
"widgetGap": "12px"
}
}
]