← Back to team overview

graphite-dev team mailing list archive

Re: [Question #73951]: maxSeries function

 

Question #73951 on Graphite changed:
https://answers.launchpad.net/graphite/+question/73951

    Status: Open => Answered

chrismd proposed the following answer:
Adding new functions is relatively easy (assuming your comfortable with
python & a tiny bit of javascript).

First you need to define your functions in
$GRAPHITE_ROOT/webapp/web/render/functions.py you can probably just copy
and modify an existing function (like sumSeries) to get what you're
looking for.

Next you need to add your function to the composer UI's function menu
which is defined in
$GRAPHITE_ROOT/webapp/content/js/composer_widgets.js. Just search for
the string 'showContextMenu:' and you will see the list of defined
functions. Just add yours. You will probably want to use the 'sumSeries'
entry as a template.

Hope that helps, and feel free to send a patch if you get it working.
Thanks!

-- 
You received this question notification because you are a member of
graphite-dev, which is an answer contact for Graphite.