A ChartJS interface for GNU Octave.
Content:
The chartjs package is a collection of classdef Classes for interfacing Octave with the CharJS JavaScript charting library. The package is at a very initial development stage and only supports the eight basic chart types of the CharJS library without any support for further configuration and plugins usually defined under the options:
tag in JavaScript code.
The chartjs package aims to facilitate the generation of web-ready HTML code for 2D charts through the familiarity of native Octave language. All available chart-specific classdef Classes rely on the parent Html
classdef for generating CharJS compatible json strings as well as HTML standalone code. The package also provides a WebServer
Class for running a local web service for displaying locally the generated charts. Note, that this functionality is highly experimental, it has only been tested under Ubuntu 20.04LTS and Octave 9.1, and it has been previously reported to cause issues with Octave under Windows.
All classdef Classes and their respective methods are documented with texinfo format, which can be accessed from the Octave command with the help
function. Use dot notation to access the help of a particular method. For example:
help BarChart
help BarChart.jsonstring
To access the documentation of available methods inherited from the Html
Class, type:
help Html.htmlstring
help Html.htmlsave
help Html.webserve
You can also find the entire documentation of the chartjs package along with its classdef index at https://pr0m1th3as.github.io/octave-chartjs/. Alternatively, you can build the online documentation locally using the pkg-octave-doc
package. Assuming both packages are installed and loaded, browse to any directory of your choice with write permission and run:
package_texi2html ("chartjs")
To install the latest release, you need Octave (>=8.1.0) installed on your system. Install it by typing:
pkg install -forge chartjs
Install the latest dev version from the Octave command prompt by typing
pkg install "https://github.com/pr0m1th3as/octave-chartjs/archive/refs/heads/main.zip"
This package also uses the CrowCpp library (header only) for running a local web service for the generated charts. You need to install the standalone Asio C++ library for the package to compile correctly.