Search code examples
pythonuser-interfacechartsdashboardtaipy

Taipy adjust height in chart


I want to create a layout for the charts as below. Could you provide me with a sample of this case?

charts

I adjusted the attribute "Height" inside the chart; no changes were made to my layout.

<|{data}|chart|x=x_col|y[1]=y_col_1|y[2]=y_col_2|type[1]=bar|height=200|>


Solution

  • For the heights, you have to add px/%/em. <{data}|chart|x=x_col|y[1]=y_col_1|y[2]=y_col_2|type[1]=bar|height=600px|>

    Here is the way to achieve the graph layout.

    <|layout|columns=1 1|
    
    <|{data}|chart|x=x_col|y[1]=y_col_1|y[2]=y_col_2|type[1]=bar|height=600px|>
    
    <|
    <|{data}|chart|x=x_col|y[1]=y_col_1|y[2]=y_col_2|height=300px|type[1]=bar|>
    <|{data}|chart|x=x_col|y[1]=y_col_1|y[2]=y_col_2|type[1]=bar|height=300px|>
    <|{data}|chart|x=x_col|y[1]=y_col_1|y[2]=y_col_2|type[1]=bar|height=300px|>
    |>
    
    |>