Theme

Overview #

Dashboard Framework supports multiple themes. The set any theme, you only need set the theme object into theme property of Application.

Common properties #

All themes have following properties:

Nametypedefaultdescription
assetsarraynullGet/set the assets settings including path to export and url to access

Example:

class App extends Application
{
    protected function onCreated()
    {
        $this->theme(
            Amazing::create()
                ->assets([
                    "path"=>"../assets",    //Path that js or css will be exported to
                    "url"=>"/assets",       //Url that those exported js and css can be accessed via browser
                ])
        );
    }
}

Amazing #

An amazingly beautiful theme for your dashboard application

use koolreport\dashboard\Application;
use koolreport\amazing\dashboard\Amazing;

class App extends Application
{
    protected function onCreated()
    {
        //Set amazing theme
        $this->theme(Amazing::create()); 
    }
}

Amazing is the default theme of dashboard framework, if you don't set theme, Amazing will automatically be used.

AppStack #

An modern-look theme for your dashboard

use koolreport\dashboard\Application;
use koolreport\appstack\dashboard\AppStack;

class App extends Application
{
    protected function onCreated()
    {
        //Set appstack theme
        $this->theme(AppStack::create()); 
    }
}

Properties #

Nametypedefaultdescription
darkboolfalseGet/set whether AppStack use light theme or dark theme
colorSchemestring"default"Get/set color scheme "default", "colored", "dark", "light"
sidebarPositionstring"left"Get/set the position of sidebar "left" or "right
sidebarBehaviorstring"sticky"Get/set the sidebar behavior "sticky","fixed","compact"
layoutstring"fluid"Get/set the layout "fluid" or "boxed"

Example:

use koolreport\dashboard\Application;
use koolreport\appstack\dashboard\AppStack;

class App extends Application
{
    protected function onCreated()
    {
        //Set appstack theme
        $this->theme(
            AppStack::create()
                ->dark(true)
                ->colorScheme("dark")
                ->sidebarPosition("right")
                ->sidebarBahavior("fixed")
                ->layout("boxed")
        ); 
    }
}

Get started with KoolReport

KoolReport will help you to construct good php data report by gathering your data from multiple sources, transforming them into valuable insights, and finally visualizing them in stunning charts and graphs.