What is $visualisations structure?

Hi,

I’m going crazy to understand the structure of $visualisations in vis_object.php?

I cann`t find any comment or documentation to understand the scheme.
The structure is used to pass values to the visualizations, but in the structure are values that I don’t understand. For example in option array, each position has another array with until 4 values:

    'timestoredaily'=> array('label'=>_("Daily from Multiple (BETA)"), 'options'=>array(
        array('feedid',_("feed"),1),
        array('units',_("units"),5,'kWh'))

I don’t know the meaning of the third position value (in the example 5). I follow it and I have found the values in vis_controller.php but there aren’t so clear to understand.

Someone could explain it for me.

Maybe there is documentation and I didn’t see…

Thanks in advance!

It’s explained as a comment on the top of that file:

/* Types:
  0 - feed realtime or daily
  1 - feed realtime
  2 - feed daily
  3 - feed histogram
  4 - boolean
  5 - text
  6 - float value
  7 - int value
  8 - multigraph id
  9 - colour
*/

Thanks!!
I was blind!!

Sorry for the inconvenience.

When I try to improve or modify emoncms usually I follow the code until achieve that I was searching. I miss a high level design to know a global view of the project.

I did the opposite while learning… When i need to know how a feature works, i start to follow what is used from the called URL. You have a controller that includes the required module files, and just start from there until you find what you are looking for.

It takes more time but you start learning the inner gears.

@nchaveiro Thank you for the advice!!