Open Bug 185474 Opened 23 years ago Updated 15 years ago

Can't have more than 16 items in legend on bar and line graphs

Categories

(Bugzilla :: Reporting/Charting, defect, P2)

2.17.1
defect

Tracking

()

People

(Reporter: gerv, Unassigned)

References

()

Details

Attachments

(1 file)

Currently, all the image templates for reporting contain code like: # Workaround for the fact that set_legend won't take row_names directly, # because row_names is an array reference rather than an array. graph.set_legend(row_names.0, row_names.1, row_names.2, row_names.3, row_names.4, row_names.5, row_names.6, row_names.7, row_names.8, row_names.9, row_names.10, row_names.11, row_names.12, row_names.13, row_names.14, row_names.15); The problem is fairly self-explanatory, and we need to fix it to allow an arbitrary number of legend items. graph.set_legend(row_names) doesn't work. Anyone got any ideas? Gerv
Hmmm. Try $row_names, perhaps? Or fix the TT plugin, I guess
bbaetz: I tried $row_names. I've actually even tried hacking TT a bit, but couldn't get this to work. References to references - all very complicated. Gerv
Priority: -- → P2
Summary: Fix hack in image display templates → Can't have more than 16 items in legend on bar and line graphs
Hmm. I don't know how to dereference that in TT off hand, although I'm sure its simple...
Today I sent mail to both Martien Verbruggen (author of GD) and the Template Toolkit list, attempting to resolve this problem from both ends. More as I hear it. Gerv
I sent Martien an email with a patch, and also sent a patch to the TT mailing list. I'll chase up Andy Wardley to see what's happened to it. Gerv
OK, this got fixed in Template Toolkit, from version 2.09 onwards. Currently, we require 2.08. bbaetz, justdave: any reason we can't bump that figure to 2.09 or (if there were problems with that release, as I seem to remember there were) 2.10? Gerv
The FLUSH patch doesn't work on 2.10, and the architecture changed enough that Myk couldn't come up with an easy way to port it. That's the only reason I can think of.
Myk: do you have any plans to port the FLUSH patch to TT 2.10? It's been the latest stable version for a while now. Can we get Andy Wardley to roll it in to 2.11, so we don't have to maintain it? Gerv
I have no immediate plans to port it. I tried back when we were migrating to mecha, and it proved non-obvious (this doesn't mean it isn't possible or even easy, just that the obvious solutions didn't work). As for getting it integrated into TT, Andy won't take the patch because it's too much of a hack. The non-hack solution is non-trivial unfortunately, but may be designed into TT3.
So we can't require anything more than 2.08 until 3 is stable? That seems to limit our options somewhat. Gerv
QA Contact: mattyt-bugzilla → default-qa
Assignee: gerv → charting
bugzilla3.0 requires tt2.12. what's it take to fix this?
Attached patch patch?Splinter Review
Attachment #438557 - Flags: review?(gerv)
Did you test this? :-) I tried doing a load of charts without the patch, and got the first 16, as expected. I then applied it, and got image errors. But then, I unapplied it and still got image errors. :-| Gerv
Comment on attachment 438557 [details] [diff] [review] patch? Removing review pending reply to above comment. Gerv
Attachment #438557 - Flags: review?(gerv)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: