示例#1
0
def update_category_graph(ddljeniscategory, ddlxcategory):
    return {
            'data': getPlot(ddljeniscategory,ddlxcategory),
            'layout': go.Layout(
                xaxis={'title': ddlxcategory.capitalize()}, yaxis={'title': 'US$'},
                margin={'l': 40, 'b': 40, 't': 10, 'r': 10},
                legend={'x': 0, 'y': 1.2}, hovermode='closest',
                boxmode='group',violinmode='group'
                # plot_bgcolor= 'black', paper_bgcolor= 'black',
            )
    };
示例#2
0
def update_graph_categorical(jenisPlot,jenisPok,radioButt):
    return {
        'data': getPlot(jenisPlot,jenisPok,radioButt),
        'layout': go.Layout(
                    xaxis={'title':jenisPok},
                    yaxis={'title':radioButt},
                    margin={'l':40,'b':40,'t':10,'r':10},
                    # legend={'x':0, 'y':1},
                    hovermode='closest',boxmode='group',violinmode='group'
                )
    }
示例#3
0
def update_graph_categorical(jenisPlot, xax, radioButt):
    return {
        'data':
        getPlot(jenisPlot, xax, radioButt),
        'layout':
        go.Layout(xaxis={'title': xax},
                  yaxis={'title': radioButt},
                  margin=dict(l=40, b=40, t=10, r=10),
                  hovermode='closest',
                  boxmode='group',
                  violinmode='group'),
    }
示例#4
0
def update_category_graph(ddlcateogrytype, ddlxtype):
    return {
        'data':getPlot(ddlcateogrytype, ddlxtype),
        'layout':
            go.Layout(
                xaxis = {'title': ddlxtype.capitalize()},
                yaxis = {'title': 'US$'},
                margin = {'l': 40, 'b':40, 't':10, 'r':10},
                boxmode = 'group', violinmode = 'group',
                hovermode = 'closest'
            )
    }
示例#5
0
def update_graph_categorical(jenisPlot):
    return {
        'data':
        getPlot(jenisPlot),
        'layout':
        go.Layout(
            xaxis={'title': 'Generation'},
            yaxis={'title': 'Total Stat'},
            margin=dict(l=40, b=40, t=10, r=10),
            # legend=dict(x=0,y=1),
            hovermode='closest',
            boxmode='group',
            violinmode='group')
    }
示例#6
0
def update_category_graph(ddlcateogrytype, ddlxtype):
    return {
        'data':getPlot(ddlcateogrytype, ddlxtype),
        'layout':
            go.Layout(
                xaxis = {'title': ddlxtype.capitalize()},
                yaxis = {'title': 'US$'},
                margin = {'l': 40, 'b':40, 't':10, 'r':10},
                boxmode = 'group', violinmode = 'group',
                #determine the position of legend (x,y)
                # legend = {'x':0, 'y':1},
                hovermode = 'closest'
            )
    }
示例#7
0
def update(jenisPlot):
    return {
        "data":
        getPlot(jenisPlot),
        'layout':
        go.Layout(
            xaxis={'title': 'Generation'},
            yaxis={'title': 'Total Stats'},
            margin={
                'l': 40,
                'b': 40,
                't': 10,
                'r': 10
            },
            # legend= {'x' : 0 , 'y' : 1},
            hovermode='closest')
    }