Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to read chart size from an attribute #2136

mapserver-bot opened this issue Apr 3, 2012 · 1 comment


Copy link

commented Apr 3, 2012

Reporter: dmorissette
Date: 2007/07/03 - 22:44
Trac URL:
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"


  • 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.


This comment has been minimized.

Copy link

commented Apr 3, 2012

Author: tbonfort
Date: 2007/10/20 - 14:40
support for setting the diameter of pie charts from an attribute have been committed in 096f9da (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


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

@ghost ghost assigned tbonfort Apr 5, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.