Project

General

Profile

Actions

Improvements #12495

open
MT ED

Enable charting library to use external javascript libraries such as Charts.js or D3js

Improvements #12495: Enable charting library to use external javascript libraries such as Charts.js or D3js

Added by Mark Travis over 2 years ago. Updated 2 months ago.

Status:
Review
Priority:
Normal
Target version:
Start date:
03/06/2024
Due date:
% Done:

0%

Estimated time:

Description

With Bootstrap 5, Flex, and other modern libraries, a missing modernization is charts.

There is no way to do stacked-bar, or several other types of charts that are starting to become popular. Even Bootstrap 5 themes have basic included chart templates that cannot be easily configured by Wt.

Like TinyMCE is a plug-in to Wt, a plug-in charting option would be very welcome.


Files

BarLineLineChart.cpp (2.45 KB) BarLineLineChart.cpp Mark Travis, 07/09/2026 07:46 PM
WChartJSOptions.h (3.72 KB) WChartJSOptions.h Mark Travis, 07/09/2026 07:46 PM
WChartJSLibrary.h (4.27 KB) WChartJSLibrary.h Mark Travis, 07/09/2026 07:46 PM
WChartJSLibrary.C (21.7 KB) WChartJSLibrary.C Mark Travis, 07/09/2026 07:46 PM
WChartJSOptions.C (7.67 KB) WChartJSOptions.C Mark Travis, 07/09/2026 07:46 PM
WChartJSDataSeries.h (8.82 KB) WChartJSDataSeries.h Mark Travis, 07/09/2026 07:46 PM
BarLineLineChart.h (1.2 KB) BarLineLineChart.h Mark Travis, 07/09/2026 07:46 PM
Chart.js-Wt-Implementation.txt (2.16 KB) Chart.js-Wt-Implementation.txt Mark Travis, 07/09/2026 07:46 PM
WChartJSDataSeries.C (16.4 KB) WChartJSDataSeries.C Mark Travis, 07/09/2026 07:46 PM

MV Updated by Matthias Van Ceulebroeck over 1 year ago Actions #1

  • Target version set to future

RM Updated by Romain Mardulyn about 1 year ago Actions #2

  • Status changed from New to InProgress
  • Assignee set to Romain Mardulyn

RM Updated by Romain Mardulyn about 1 year ago Actions #3

  • Private changed from No to Yes

Including an optional library would not really be feasible without decoupling charts from painted widgets, which would itself, be hard to do without breaking retro-compatibility. Instead we should make a tutorial on how to integrate an external library to Wt.

RM Updated by Romain Mardulyn about 1 year ago Actions #4

  • Private changed from Yes to No

RM Updated by Romain Mardulyn about 1 year ago Actions #5

  • Status changed from InProgress to Review
  • Assignee deleted (Romain Mardulyn)

RM Updated by Romain Mardulyn 2 months ago Actions #6

  • Target version changed from future to 4.15.0

MT Updated by Mark Travis 2 months ago Actions #7

Romain Mardulyn wrote in #note-3:

Including an optional library would not really be feasible without decoupling charts from painted widgets, which would itself, be hard to do without breaking retro-compatibility. Instead we should make a tutorial on how to integrate an external library to Wt.

I noticed this just got added to 4.15.0. Is the effort still to create a tutorial? Or do you plan to create a working version?

I'll contribute my chartjs implementation. I decoupled it from the Wt internal structure, but it tries its best to use the Wt data libraries as designed. I'm sure your team can make it better, which is why I didn't open a pull request.

There's a txt file that gives a broad overview on how to use it. BarLineLineChart is a crude, sample implementation.

ED Updated by emil de keyser 2 months ago Actions #8

  • Assignee set to emil de keyser
Actions

Also available in: PDF Atom