Use custom widgets
If you need more widgets than the built-in ones, you can:
- Download a widget from the Apache ECharts website, add it with its JS file, and then customize JavaScript.
- Copy the JavaScript of a widget from the Apache ECharts website, and then paste the JavaScript to the widget editor.
Typically, a widget has two associated JS files:
- Files ended with _Custom.jsare for the widget appearance.
- Files ended with _Refresh.jsare for the data connection.
To add a custom widget
- Go to the Apache ECharts website, and then find a chart or graph that you need.
- Download a widget's JavaScript, and then save it as a JS file. Alternatively, you can copy its JavaScript, and then paste it to the widget editor later.IMPORTANT:The JS file name must end with _Custom.jsor _Refresh.js.
- In FactoryTalk View Studio, select.NET Controlfrom theToolbox, and then add it to a display.
- On theWindows Formstab, selectEChartsWidget, and then selectOK.
- In theDotNetControl Propertiesdialog box, selectEChartsWidget Setup.
- In theEChartsWidget Propertiesdialog box, select the browse button next toAppearanceScriptorConnectionScript.
- In theEChartsWidget editor, selectAdd widget, and then select both JS files.If you've copied a widget's JavaScript, paste it to the editor, and then go to step 9.The _Custom.js is loaded in theAppearance editor, and the _Refresh.js is loaded in theConnection editor. You should customize and edit the scripts in the individual editor for them to work.
- From theSelect widgetlist, select your custom widget.
- Configure JavaScript as needed and bind with the value connections.
- Enter values inPreview properties, and then selectPreview.
- If the widget in the preview is what you want, selectOK.
- Return to theDotNetControl Propertiesdialog box, and then select theConnectionstab.
- Bind the value connections with your tags, and then selectOK.
Provide Feedback