• I’m using Contact Form 7 and would like to plot data from the database as it is updated. The first five lines of the code below return the values, but how do I get these into a GoogleGraph? Also, I wouldn’t want to chart an entry if the value is 0.

    total entries=[cfdb-count form="form_name"]
    A=[cfdb-count form="form_name" field="class--so" search="A"]
    B=[cfdb-count form="form_name" field="class--so" search="B"]
    C=[cfdb-count form="form_name" field="class--so" search="C"]
    D=[cfdb-count form="form_name" field="class--so" search="D"]
    
    [barChart width="500px" stacked="1"
    legend="{ position: 'top', maxLines: 2 }"
    vaxis="{title: 'in $000', titleTextStyle: {color: 'blue'}}"
    haxis="{title: 'number of entries', titleTextStyle: {color: 'blue'}}"]
    ['class', 'count'],
    ['A', 1],
    ['B', 0],
    ['C', 2 ],
    ['D', 4]
    [/barChart]

    So in other words, in the barChart example where I have the data 1,0,2,4 hard-coded above, I’d want to replace those with live data from the data base (except for the ‘B’,0 case, which shouldn’t be plotted.

    https://www.ads-software.com/plugins/googlegraph/

  • The topic ‘Contact Form values into chart data?’ is closed to new replies.