-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdashboard.py
57 lines (47 loc) · 1.63 KB
/
dashboard.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# -*- coding: utf-8 -*-
"""
Created on Mon Apr 9 21:48:27 2018
@author: Dell
"""
#class sklearnBoard():
# pass
import dash
import dash_core_components as dcc
import dash_html_components as html
import numpy as np
import pandas as pd
from datetime import datetime as dt
import plotly.graph_objs as go
import dash_auth
# import plotly.dashboard_objs as dashboard
class Dashboard():
"""
prepares grid with specified number of columns in a single row and returns the div element
input : pass respective number of html elements to the respective Function:
output :returns grid with specified number of columns
"""
def __init__(self):
pass
# self.no_of_grid=no_of_grid
def three_columns_grid(self,element1,element2,element3,className='four columns'):
"""
input :Three html elements (from Dash)
output: returns dash html div with three grids
"""
three_colum_div=html.Div(children=[html.Div(element1,className=className),html.Div(element2,className=className),
html.Div(element3,className=className)],className="row")
return three_colum_div
def two_columns_grid(self,element1,element2,className='six columns'):
"""
input :Two html elements (from Dash)
output: returns dash html div with two grids
"""
two_colum_div=html.Div(children=[html.Div(children=element1,className=className),html.Div(children=element2,className=className)],
className="row")
return two_colum_div
#class Univariate():
# """
#
# """
# def pie_chart():
#