PLUGIN : doing graphics with my datas


(userlander) #1

hey piwikers …
i’m creating a plugin, to get some personals stats on websites (to count uses of tabs, of services or others)

I’m using Piwik_query to get my datas, and i would put this data on a graphic, i followed the exemple of visitsSummary’s plugin,
but it uses archive to get and format data, and then display it…

i’m trying to understand, but it’s difficult to go on, could you help me ?

the simple way for me will be to put directly data by a function an genereting automaticly a graph … if you have any help, or any best place to search i take it.

thx for reading and help.


(userlander) #2

i’m turning around,

To using piwik graph/sparklines, we need a datatable objet (an array with a special strucuture).

Class Piwik_dataTable is a tool to sort or get value from datatable, to add data to or sort it, Piwik_datatable_manager get data from database to datatable using numerics or blobs files …

i hope what i said are my mistakes …

i think, i’m gonna do a function wich gonna format data from results of db requests to object datatable_single …

but it should be an other way, an existant way … if you know, tell me …


(userlander) #3

ok i think i get it …

archive is used by graph system like source of datas, you want add table and generate a graph for personalise your datastore, you need to use archive system.

functionment :

  • user do things -> it inserts data in data base(piwik)
  • you want to see data from a precise date to a precise date, you will have to create :
    …an archive (if it’s not already created),
    …a generate a link used by graph tools (like sparkline) with the module, the action, and the needed datas …
  • the params of this link will precise data you need in the archive to generate the graph.

next step : how to add a table in the archive’s creation in a simple way ?..

any doc or any answer will be the welcomed style_emoticons/<#EMO_DIR#>/smile.gif

ps: and if could have the link of places where piwikers chats, it will be great for me.


(Matthieu Aubry) #4

userlander, please post your question with your requirements in the piwik-hackers mailing list (more info on dev.piwik.org ) this is where all piwik developers look at, as well as community members


(jmadsen) #5

Hi,

Not to be pushy, but I posted this on the hackers list, but there’s been no reply. I need to get this project done.

To summarize, I have a table I have added to the piwik db, and would like to build a graph widget against it.

Must I Archive the data, and if so, how? I’m rather confused about all the steps involved in making this happen.


(userlander) #6

hi jmadsen,
i’m in the same point as you, i stop research on week ago because i had my exams.
But i’am pretty shure that you need to archive it,
Before you answer i began to look for an other way to display it, i found many graph system pchart and zscomponents are the best …

I hope piwiker and piwik-hackers will answer …

if i have something i will contact you jmadsen.

ps : thx for the advice matthieu.