This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

felix.gerdes5938
felix.gerdes5938

Hi,

i just think about adding a piechart to an update Page in my backend. The pie chart should be filled with values of database fields from the same records.

I tried with a little partial. But this is not working. Cause the $model var is not rendered inside the partial.

Somebody experience with this?

Felix

axomat
axomat

You should use a report widget.

My suggestion is that you install the Backend plugin from Indikatur to see some nicely produced report widgets and you can copy the one that looks closest to what you want to achieve.

felix.gerdes5938
felix.gerdes5938

Thanks for the answer. I`ll think about it and post a solution for my problem...

jvanremoortere
jvanremoortere

This is an old post but did you actually got this fixed? Can't find any example of a report widget being used on an update / index / ... page.

gergo85
gergo85

I have a same problem. I would like to add a chart to my plugin index page, but it doesn't appear. Does anyone have a solution?

gergo85
gergo85

I solved this problem.

merodeador
merodeador

gergo85 said:

I solved this problem.

hi, could you please explain how you did this?

gergo85
gergo85

Use the following code:

<div class="report-widget">
    <div class="scoreboard">
        <div data-control="toolbar">
            Your chart code (http://octobercms.com/docs/ui/chart)
        </div>
    </div>
</div>

Last updated

Nayz
Nayz

gergo85 said:

Use the following code:

<div class="report-widget">
   <div class="scoreboard">
       <div data-control="toolbar">
           Your chart code (http://octobercms.com/docs/ui/chart)
       </div>
   </div>
</div>

Hi, may I get any hint for the code on how to retrieve the values of database fields from the same records?

1-9 of 9

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.