Ticket #2136 (closed defect: fixed)

Opened 11 months ago

Last modified 1 month ago

Add ability to read chart size from an attribute

Reported by: dmorissette Assigned to: tbonfort
Priority: normal Milestone: 5.2 release
Component: MapServer C Library Version: 5.0
Severity: normal Keywords:
Cc: dmorissette

Description (Last modified by tbonfort)

During the questions/comments period of RFC-29 (Dynamic Charting Capability, see also ticket #1800), one of the questions raised was whether we could provide the ability to bind the chart size to an attribute.

This would be a nice to have but will not be included in the initial RFC implementation. Instead I propose that we keep this as a future enhancement. Here is the approach that I proposed on the mapserver-dev list:

I've thought about this some more. It is probably not sufficient to provide the ability to lookup the chart size in an attribute, since this attribute may not be a value in pixels but would be an actual value (e.g. total amount of sales) so you really need to be able to define a range of sizes for the chart which is driven by an attribute.

We could be to keep PROCESSING CHART_SIZE as is, and define a second mechanism to specify the chart size:

 PROCESSING "CHART_SIZE_RANGE = itemname minsize maxsize minval maxval"

where:

- itemname is the name of the attribute that drives the chart size (e.g. total_sales)

- minsize and maxsize are the minimum and maximum chart size values in pixels (e.g. "10 100")

- minval and maxval are the minimum values of the attribute that correspond to chart sizes of minsize and maxsize (e.g. 10000 1000000).

If the attribute value is smaller than 'minval' then the chart size will be minsize pixels, and if the attribute value is larger than maxval, the chart size will be maxsize pixels.

Change History

07/03/07 16:44:42 changed by dmorissette

  • description changed.

07/26/07 09:44:54 changed by dmorissette

  • cc set to t.

07/26/07 09:46:22 changed by dmorissette

  • cc changed from t to tbonfort.
  • version set to 5.0.
  • milestone changed from FUTURE to 5.2 release.

10/20/07 08:40:01 changed by tbonfort

  • owner changed from dmorissette to tbonfort.
  • cc changed from tbonfort to dmorissette.
  • description changed.

support for setting the diameter of pie charts from an attribute have been committed in r6962 . the same functionality for bar charts has not been implemented as

- there are two variables to change (width /and/ height) => we'd need additional processing keywords

- the concept of dynamic size for a bar chart doesn't really make sense

this commit also supports setting

PROCESSING "CHART_SIZE_RANGE = itemname"

without the minsize,maxsize,minval,maxval values for when the diameter can be read directly from an attribute without need for rescaling

04/17/08 04:06:35 changed by tbonfort

  • status changed from new to closed.
  • resolution set to fixed.