Skip to content

Commit

Permalink
add key for plotly_chart
Browse files Browse the repository at this point in the history
Signed-off-by: min.tian <[email protected]>
  • Loading branch information
alwayslove2013 authored and XuanYang-cn committed Oct 28, 2024
1 parent f18eaec commit aa6d4dc
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions vectordb_bench/frontend/components/concurrent/charts.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def drawChartsByCase(allData, showCaseNames: list[str], st):
for caseData in caseDataList
for i in range(len(caseData["conc_num_list"]))
]
drawChart(data, chartContainer)
drawChart(data, chartContainer, key=f"{caseName}-qps-p99")


def getRange(metric, data, padding_multipliers):
Expand All @@ -36,7 +36,7 @@ def getRange(metric, data, padding_multipliers):
return rangeV


def drawChart(data, st):
def drawChart(data, st, key: str):
if len(data) == 0:
return

Expand Down Expand Up @@ -73,7 +73,4 @@ def drawChart(data, st):
fig.update_yaxes(range=yrange, title_text="QPS")
fig.update_traces(textposition="bottom right", texttemplate="conc-%{text:,.4~r}")

st.plotly_chart(
fig,
use_container_width=True,
)
st.plotly_chart(fig, use_container_width=True, key=key)

0 comments on commit aa6d4dc

Please sign in to comment.