Skip to content
This repository has been archived by the owner on May 5, 2021. It is now read-only.

Pluggable charts #18

Closed
hyandell opened this issue Nov 8, 2015 · 5 comments
Closed

Pluggable charts #18

hyandell opened this issue Nov 8, 2015 · 5 comments

Comments

@hyandell
Copy link
Contributor

hyandell commented Nov 8, 2015

Currently charts are hard coded. The data should be moved out to JSON files rather than inline, and there should be a way to add your own charts.

@hyandell
Copy link
Contributor Author

Thinking out loud; charts have two aspects to them:

  1. Generation of data.
  2. Configuration of the chart.

With flot you can comfortably have two separate JSON files be used; though it wasn't the simplest with some of my charts because it doesn't like having years missing (i.e. it doesn't know they're years). The data had to be munged if zero data was going to show up to ensure the zero data was there.

@hyandell
Copy link
Contributor Author

hyandell commented Apr 28, 2016

A third aspect may be placement.

The change to the UI means that a Charts menu will automatically be available, but I'll also want to use the framework for the current hardcoded charts. I'll still want to place them at the top of standard pages, and there should be a mechanism to replace them with other charts.

Alternatively rather than placement, the hardcoded charts could have ids. When the configuration is loaded, it is put over the top of a default list of charts, replacing any that have the same id. The ids then serve as placement.

There will also need to be user, issue and repository charts, just as there is that separation of types for reports. One possibility is to just have it use the reports framework, but add charts as a particular configuration of rendering. The existing reports perhaps would be a table rendering, allowing for other forms besides charts and tables.

Possibly a bit of an over-design given the simplicity of architecture of the rest of the system :) Which may speak to a port from XSLT to ERB or some such :)

@hyandell
Copy link
Contributor Author

Noting that I'm working on this at the moment. JSON data files are pulled, along with JSON chart configuration. This'll make it possible for reports to provide data/chart json to indicate they have a chart or more to include in their report.

@hyandell
Copy link
Contributor Author

hyandell commented Sep 4, 2017

The above change is now committed.

@jamesiri
Copy link
Contributor

jamesiri commented May 4, 2021

#142

@jamesiri jamesiri closed this as completed May 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants