Edgewall Software

Opened 15 years ago

Last modified 14 years ago

#426 closed enhancement

Replace XML/SWF Charts with an open system — at Version 25

Reported by: dfraser Owned by: dfraser
Priority: major Milestone: 0.6
Component: Trac plugin Version: 0.6b2
Keywords: charts Cc: silk@…, tim@…, felix.schwarz@…, mpotter@…, hodgestar
Operating System:

Description (last modified by dfraser)

XML/SWF Charts:

  • has some layout problems on some machines (which are probably fixable)
  • is not open source/free software (which is probably not fixable)
  • only generates Flash charts (which is a bit icky)

This ticket is to collect the simplest ideas to replace it with something else. Sample options include (please add serious contenders here):

Change History (31)

comment:1 follow-up: Changed 15 years ago by silk <silk@…>

  • Cc silk@… added

Just a comment, why I think Google Chart API would not be a good solution.

For closed source development, sending even the data for graphs to external service may be unacceptable (politicaly, etc). I know it would be a big problem for us.

comment:2 in reply to: ↑ 1 Changed 15 years ago by dfraser

Replying to silk <silk@…>:

Just a comment, why I think Google Chart API would not be a good solution.

For closed source development, sending even the data for graphs to external service may be unacceptable (politicaly, etc). I know it would be a big problem for us.

Absolutely, I just included it for reference as it was used by other Trac extensions.

comment:3 Changed 15 years ago by cboos

  • Type changed from task to enhancement

Definitely a must. I would suggest a jQuery based solution, like Flot.

comment:4 Changed 15 years ago by mgood

jqPlot is another nice jQuery-based library.

Changed 15 years ago by dfraser

Initial reimplementation of charting in flot

comment:5 Changed 15 years ago by dfraser

The attached patch includes the flot.js and excanvas.js files. It seems to work, but not been seriously tested. There's definitely room for work on visuals, but for me it's already nicer than the flash charts :-)

Changed 15 years ago by dfraser

Screenshot (note that lint and coverage aren't enabled on these tests)

comment:6 Changed 15 years ago by cmlenz

gRaphaël looks pretty darn nice, too.

comment:7 follow-up: Changed 14 years ago by Tim Niemueller <tim@…>

  • Cc tim@… added

I have packaged Bitten for Fedora and FreeBSD and I'm about to submit these packages for inclusion. For Fedora this is not possible with the given chart library, given that it is not open source and therefore not acceptable as per http://fedoraproject.org/wiki/Licensing.

We are not using charting feature in our project, yet. Hence I didn't test the supplied patch. Can someone confirm that the patch is working and a equal replacement?

In that case I'll include the open charting patch in the package and remove the existing stuff. Is there a chance to see this already in 0.6, given that there is a patch available that can do this already?

comment:8 in reply to: ↑ 7 ; follow-up: Changed 14 years ago by anonymous

Replying to Tim Niemueller <tim@…>:

I have packaged Bitten for Fedora and FreeBSD and I'm about to submit these packages for inclusion. For Fedora this is not possible with the given chart library, given that it is not open source and therefore not acceptable as per http://fedoraproject.org/wiki/Licensing.

That's great news...

We are not using charting feature in our project, yet. Hence I didn't test the supplied patch. Can someone confirm that the patch is working and a equal replacement?

The patch is working but is not yet an equal placement - the charts it generates are functional but fairly ugly.

In that case I'll include the open charting patch in the package and remove the existing stuff. Is there a chance to see this already in 0.6, given that there is a patch available that can do this already?

Given this was a first stab and 0.6 is a desparate-release-because-none-has-been-made for ages, it was meant to be deferred... you could bring up a discussion on IRC/the mailing list if you want

comment:9 in reply to: ↑ 8 Changed 14 years ago by dfraser

Replying to anonymous:

Replying to Tim Niemueller <tim@…>:

We are not using charting feature in our project, yet. Hence I didn't test the supplied patch. Can someone confirm that the patch is working and a equal replacement?

The patch is working but is not yet an equal placement - the charts it generates are functional but fairly ugly.

Forgot to login - that comment was from me (dfraser)

comment:10 follow-up: Changed 14 years ago by Tim Niemueller <tim@…>

Are you working on this atm? Is it feature-wise equali with the flash charts despite looking ugly? What has to be done otherwise? Would you say it is an acceptable compromise to use your patch and getting it packaged and included in Fedora? Otherwise that would have to wait for some time...

comment:11 in reply to: ↑ 10 Changed 14 years ago by dfraser

Replying to Tim Niemueller <tim@…>:

Are you working on this atm? Is it feature-wise equali with the flash charts despite looking ugly? What has to be done otherwise? Would you say it is an acceptable compromise to use your patch and getting it packaged and included in Fedora? Otherwise that would have to wait for some time...

I generated the initial patch, and since the plan was for it to be deferred to 0.7 I haven't put any more effort into it. But I am running a production server using it (on Fedora 7, I produce my own rpms) - the plan is for either this patch or an equivalent patch using an alternative graphing system to make it into bitten for the next milestone, so I think per Fedora's policies it would be best to include it (the only alternative being to remove charting). But I think you should test yourself and see since you're the one who's going to submit it.

Changed 14 years ago by hodgestar

Updated patched (use either json or simplejson, move legend, remove old charting templates, remove non-functional xaxis ticks).

Changed 14 years ago by hodgestar

Screenshot of old XML charts for comparison.

Changed 14 years ago by hodgestar

Screenshot of new JQuery charts (made using patch 2).

comment:12 Changed 14 years ago by Felix Schwarz <felix.schwarz@…>

  • Cc felix.schwarz@… added

comment:13 Changed 14 years ago by mpotter@…

  • Cc mpotter@… added

comment:14 Changed 14 years ago by hodgestar

  • Owner set to hodgestar
  • Status changed from new to assigned

comment:15 Changed 14 years ago by hodgestar

  • Cc hodgestar added

Changed 14 years ago by dfraser

Reworked patch to apply to latest trunk

comment:16 Changed 14 years ago by dfraser

The attached patch seems OK to me now - we could potentially do some stylistic adjustments, but as far as I'm concerned, this is at least ready for trunk

comment:17 Changed 14 years ago by dfraser

Committed in r846, but leaving this open for testing...

comment:18 Changed 14 years ago by dfraser

Backported in [846]; as of that point trunk and 0.6.x are identical except for versioning...

comment:19 Changed 14 years ago by anatoly techtonik <techtonik@…>

jQuery sparkline is another library to consider for inline charts http://omnipotent.net/jquery.sparkline/

comment:20 Changed 14 years ago by hodgestar

  • Milestone changed from 0.7 to 0.6
  • Version changed from dev to 0.6b2

comment:21 follow-up: Changed 14 years ago by dfraser

Discussion in mailing list on the added requirement for a JSON parser includes this:

Trac has a JSON encoder on trunk, which handles most simple cases. It is used to serialize e.g. ticket field data for the custom query page. See the bottom of (lines 282 and following):

http://trac.edgewall.org/browser/trunk/trac/util/presentation.py

The plan is to use that as a fallback for the inbuilt JSON library in Python 2.6

comment:22 in reply to: ↑ 21 Changed 14 years ago by dfraser

Replying to dfraser:

Discussion in mailing list on the added requirement for a JSON parser includes this:

Trac has a JSON encoder on trunk, which handles most simple cases. It is used to serialize e.g. ticket field data for the custom query page. See the bottom of (lines 282 and following):

http://trac.edgewall.org/browser/trunk/trac/util/presentation.py

The plan is to use that as a fallback for the inbuilt JSON library in Python 2.6

Unfortunately it's only available in Trac 0.12 onwards. Bleaugh

comment:23 Changed 14 years ago by dfraser

  • Owner changed from hodgestar to dfraser
  • Status changed from assigned to new

Committed a version that handles using trac's json method, or if not Python's, or if not, an internal version in [857], and backported it in [858]

comment:24 Changed 14 years ago by dfraser

  • Status changed from new to assigned

comment:25 Changed 14 years ago by dfraser

  • Description modified (diff)
Note: See TracTickets for help on using tickets.