Rapid Javascript Chart Prototyping Tool

Feb 13, 2022 2 min read

The project started when I faced a problem of implementing a Javascript widget, but without having in short-term a data stream to use. Modifications in servers might be slow to obtain, depending on the organisation and work schedules. The aim was to obtain a standardised tool that allows to simulate a real environment (a server to which forward GET requests) and visualise data. This allows to focus on the development of the Javascript widget, without waiting server modifications nor just guessing the results of the coding activity.

Server

The server was implemented in Python-Django with same interface as the original server. The data are taken from a locally stored database, so that no internet connection is needed. It, therefore, provides a easy-to-use tool for feeding the Javascript widget with real (not real-time though) data.

Widget

The page instead is a HTML standard page that includes the widget. This last one is consisting in some Javascript code, mainly for issuing GET requests and process the arriving data, and then plots it using Plotly library. In addition to the widget, in order to make it more interactive, was coded a JQuery button that allows a simple GUI.

The results of the project can be briefly resumed by the following video that shows almost all the aspects of the project.