Replace chart component

Hi there !!

Some guidelines for replacing current chart component with another javascript based one ??

Tnx !!

Hello!

A good start should be looking into CompoundComponent class and ImageChartComponent class. These 2 for the component, and you should also look up the whole folder:

com.serotonin.mango.vo.report - where the magic happens - JFreechart creates the image chart;

com.serotonin.mango.web.servlet - Servlet publishes the image created.

So, to create a new Chart Component, you should

  1. understand how charts are created;
  2. understand how charts are deployed by the servlet;
  3. create a new component;
  4. understand how js engine updates charts;

Wow... hard work isn´t it? hehehe

But you can use a shortcut with js tools as gRaphael and other js graphic creators. Check this live example

http://kraken.alarex.net:8080/mango_alarex/public_view.htm?viewId=9

Also, you can alter the source code to provide yout with more functions in the server side script.

Regards and luck! Please, post back your finds =]

1 curtida

It seems not to be a trivial work ;-)

Thank you for your reponse, I will try to do something.

Best regards