Forum OpenACS Q&A: Re: ANN: New diagram package added to cvs

Collapse
Posted by Nima Mazloumi on
Matthew,
maybe you can take a look at my examples that I have added to the documentation.

The api of diagram is flexible in the sense that you can add your own way how the data is dealt with that was passed to template::diagram::create

See under diagram/resources/diagram/.. for examples.

Thus I believe for using nsgd one could write further templates like gdpie.adp

To ask template::diagram::create to use this template you call

db_multirow datasource select_objects $query

template::diagram::create \
    -name dia1 \
    -multirow datasource \
    -title "Objects" \
    -x_label "Time" \
    -y_label "Count" \
    -left $left -top $top -right $width -bottom $height \
    -scales "$x_scale $y_scale" \
    -template gdpie \
    -elements {
        d1 {
            color "#$d1_color"
            label "Pie 1"
            size $size
        }
    }
What do you think?
Collapse
Posted by Matthew Burke on
Nima,

Interesting stuff. As soon as the beginning-of-semester rush slows down a little bit, I'll look at it in more details.

Thanks,

Matt