


# %%
import plotly.express as px
import pandas as pd

# Load the Excel file into a DataFrame
file_path = "AjtSolarSolution.xlsx"
sheet_name = "Radar Plot"

# Read the data, setting the first column as the index
df = pd.read_excel(file_path, sheet_name=sheet_name, index_col=0)
df
# %%
fig = px.line_polar(
    df.round(2),
    r='16 (Balanced)',  # Column for radial coordinates
    theta=df.index, # Column for angular coordinates
    text='16 (Balanced)',  # Column for hover text
    line_close=True,  # Closes the line plot, connecting the end point to the start point
    range_r=[1,10],  # Sets the range of radial axis (ranging from 1 to 10)
    markers=True,  # Adds markers at data points
    title='16th Period KPIs (Balanced Weights)')
fig.update_traces(fill='toself')
fig.show()
