Disclaimer
This repository is provided "AS-IS" with no warranty or support given. This is not an official or supported product/use case.
Description
This repo contains instructions on how to plot a 3D surface and display it in a mashup. It contains:
- an example dataset (plotly3Datatable) and a sample mashup (plotlyTest).
- the build artifacts for ThingworxPlotlyChartingSDK and ThingworxPlotlyExamplePlots
This guide leverages the work of jmccuen who implemented the plotly javascript library using the Thingworx Java SDK. The PlotlyExamplePlots extension also contains implementations for other graphs:
- Timeseries Plot
- Label Plot
- Pie Plot
- and Surface Plot which we are demonstrating here.
- Import the PlotlyChartLibrary-dev-1.0.192.zip first, into Thingworx, then import PlotlyPlots.zip.
- Import the example datashape, datatable entity, datatable data, and then the mashup plotlyTest.
You can now view the 3D surface plot inside the example mashup or create your own plot, using the Surface Plot widget, that should now appear in the widget picker.
As you will see from the sample data table included, or the sample data from Plotly, the format required for this type of plot to work is a grid pattern (x,y) and the elevation (z).
The first column will be y, from 0 to 24 for example. The first row will be x, starting with 0 in column 2, i.e. for each intersection of [x,y] you will have height z.
You can also check out the sample Js available from Plotly.
The Topographical 3D Surface Plot is the type implemented in this version. More 3D charts can be implemented by modifying the Surface Plot code ThingworxPlotlyExamplePlots/ui/surfaceplot/ .
By downloading this software, the user acknowledges that it is unsupported, not reviewed for security purposes, and that the user assumes all risk for running it.
Users accept all risk whatsoever regarding the security of the code they download.
This software is not an official PTC product and is not officially supported by PTC.
PTC is not responsible for any maintenance for this software.
PTC will not accept technical support cases logged related to this Software.
This source code is offered freely and AS IS without any warranty.
The author of this code cannot be held accountable for the well-functioning of it.
The author shared the code that worked at a specific moment in time using specific versions of PTC products at that time, without the intention to make the code compliant with past, current or future versions of those PTC products.
The author has not committed to maintain this code and he may not be bound to maintain or fix it.
I accept the MIT License (https://opensource.org/licenses/MIT) and agree that any software downloaded/utilized will be in compliance with that Agreement. However, despite anything to the contrary in the License Agreement, I agree as follows:
I acknowledge that I am not entitled to support assistance with respect to the software, and PTC will have no obligation to maintain the software or provide bug fixes or security patches or new releases.
The software is provided “As Is” and with no warranty, indemnitees or guarantees whatsoever, and PTC will have no liability whatsoever with respect to the software, including with respect to any intellectual property infringement claims or security incidents or data loss.