dynamic symbols, eg bar graphs or pie charts

Steve Lime Steve.Lime at DNR.STATE.MN.US
Tue Jun 13 17:42:08 EDT 2006


You'd have to preprocess the data to compute angle columns or size columns 
for bar graphs. I need to look at your bug report closely...

The expression bindings are detailed in RFC 19 on the MapServer website. One idea
was to allow something like angle or size to take the value of an expression.

Steve

>>> thomas bonfort <thomas.bonfort at GMAIL.COM> 6/13/2006 1:03:34 AM >>>
am I missing something or can this already be done online with arbitrary
data? without an angleitem and startangleitem and some "not so easy" postgis
processing for the start angles, I don't get it.
The advantage here is using arbitrary data, and in this context can be
easily extended to bar graphs for example.
I couldn't find any reference to the expressions bindings you talk about,
any pointers?

tb

On 6/13/06, Steve Lime <Steve.Lime at dnr.state.mn.us> wrote:
>
> That is very similar to the chart hack I've done precviously. With postgis
> I would imagine computing angles (from percentages) would be easy. I now see
> a use for Steve W. expression bindings...
>
> Please file a bug to track your additions and we can talk about
> integration.
>
> Steve
>
> >>> thomas bonfort <thomas.bonfort at GMAIL.COM> 06/12/06 2:25 PM >>>
> hi there,
> I quickly hacked up something, finally leaving out gdchart mainly because
> I
> was too lazy to modify it so it accepts a gdhandle rather than file
> pointers, but also because the sizes of the output charts were'nt
> consistent
> with one another.
> I've attached a jpeg image of the output.
> basically so as to keep the "class" parts semantically correct, I use a
> new
> layer type "CHART", in which each class corresponds to a slice of the pie
> chart, and the sizeitem to the value. the example shown here is therefore:
>
> LAYER
>     NAME "ages"
>     TYPE CHART
>       CONNECTIONTYPE postgis
>       CONNECTION "blabla"
>       DATA "the_geom from demo"
>       STATUS ON
>       CLASS
>            NAME "population age 0-19"
>           STYLE
>                  SIZEITEM "v1006"
>                  COLOR 255 244 237
>              END
>       END
>       CLASS
>           NAME "population age 20-39"
>           STYLE
>                  SIZEITEM "v1007"
>                 COLOR 255 217 191
>             END
>       END
>       CLASS
>           NAME "population age 40-59"
>           STYLE
>                  SIZEITEM "v1008"
>                 COLOR 255 186 140
>             END
>       END
> END
>
> I'd hope this could be integrated/expanded in a future version, keep in
> touch if you're interested.
> cheers,
> tb
>
>
> On 6/9/06, Daniel Morissette <dmorissette at mapgears.com> wrote:
> >
> > thomas bonfort wrote:
> > >
> > > Steve and Daniel: the url type symbol does seem promising
> feature-wise.
> > > but once again the overhead of network request and probably two
> > > intermediate files (one for owt, one for MS) seems quite important.
> > >
> >
> > True, there can be a performance hit for large numbers of symbols, but
> > using an external service via a URL to produce the chart or dynamic
> > symbol gives maximum flexibility to the users to return whatever they
> > like and not just charts.
> >
> > Anyway, if you insist on direct integration inside MapServer, then I'd
> > recommend that you look at gdchart which is used by OWTChart
> > (http://maptools.org/owtchart/)... the original version of gdchart was
> > messy with a bunch of global variables and static stuff that didn't
> > build well on all platforms, and for owtchart I reworked it to replace
> > the global vars with a struct and make it more multi-platform. You'll
> > find that version in directory "gdchart2" in the owtchart source
> > package. The only other dependency of gdchart is GD (and its own
> > dependencies), that would be fairly easy to integrate.
> >
> > Daniel
> > --
> > Daniel Morissette
> > http://www.mapgears.com/ 
> >
>
>



More information about the mapserver-dev mailing list