Hi,
I have a px.line chart as follows:
fig_incidentReporting = px.line(df_aggregated_incidents,
x=“FYMonth”,
y=‘Claims’,
color=“FY”,
title=“Claims”,
color_discrete_sequence=colors,
render_mode=“SVG”,
height=350,
hover_data=[“FY”, “FYMonth”, “Claims”]
)
Now in the above line chart my aggregation is not coming out correctly. I want to sum my Y axis but it plots each and every value of Y axis as is despite the dataframe being grouped by etc.
Can i use something like below in px.line ? If so then can someone share how ?
transforms = [dict(
type = ‘aggregate’,
groups = df_aggregated_incidents[‘FYMonth’],
aggregations = [dict(
target = ‘y’, func = ‘sum’, enabled = True),
]
)]