Unwanted Charts Showing on List Page

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
shaunroth
User
Posts: 11

Unwanted Charts Showing on List Page

Post by shaunroth »

Why are charts now showing on my list page? How do I remove them from showing on the list page?
I just want to put them on a dashboard which works great.
If I go to the chart config in the table, and uncheck the show check box, the chart then disappears from the list page but then it also does not work on the dashboard.


arbei
User
Posts: 9384

Post by arbei »

Note that dashboard just reuse the script for the charts from the source table. You cannot disable the chart from the source table. You may create a view from the table, create the chart from the view and use it for the dashboard. (You may hide the view from the menu editor if you won't want to show it.)


shaunroth
User
Posts: 11

Post by shaunroth »

I'm sure there are multiple paths here to take to resolve this issue. Here is the one support provided me. I'm sharing it in hopes it may help others.

// Page Render event
function Page_Render()
{
    //Log("Page Render");
    global $DashboardReport;
    if (!$DashboardReport) { // Hide charts if not dashboard report

        // Hide charts except on dashboard
        $this->GeoLocation->ShowChart = false;
        $this->Departments->ShowChart = false;
        $this->JobFamily->ShowChart = false;
        $this->ManagementRole->ShowChart = false;
        $this->ActiveDirectoryEnrollment->ShowChart = false;
        $this->CloudStackEnrollment->ShowChart = false;
        $this->ICLevel->ShowChart = false;
        $this->JobFamilyGroup->ShowChart = false;
        $this->JobTitle->ShowChart = false;
    }
}

This above code was put in server event "Page_Render" under "List Page" section. I'm using PHPMaker 2024


Post Reply