fix(ui): table charts checking the total and list
This commit is contained in:
parent
49c408f44e
commit
c59dbbc79d
2 changed files with 3 additions and 3 deletions
|
|
@ -20,7 +20,7 @@ function CardSessionsByList({ list, selected, paginated, onClickHandler = () =>
|
|||
const params = { density: 35 };
|
||||
const metricParams = { ...params };
|
||||
const [loading, setLoading] = React.useState(false);
|
||||
const data = paginated ? metric?.data[0]?.values : list;
|
||||
const data = paginated ? metric?.data?.values : list;
|
||||
|
||||
const loadData = async (page: number) => {
|
||||
const timestamps = drillDownPeriod.toTimestamps();
|
||||
|
|
@ -56,7 +56,7 @@ function CardSessionsByList({ list, selected, paginated, onClickHandler = () =>
|
|||
title={(
|
||||
<div className="m-0">
|
||||
<div className="flex justify-between m-0 p-0">
|
||||
<Typography.Text ellipsis={true} className='w-[95%]'>{row.displayName}</Typography.Text>
|
||||
<Typography.Text ellipsis={true} className='w-[90%]'>{row.displayName}</Typography.Text>
|
||||
<Typography.Text type="secondary"> {row.sessionCount}</Typography.Text>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -334,9 +334,9 @@ export default class Widget {
|
|||
} else if (this.metricType === FUNNEL) {
|
||||
_data.funnel = new Funnel().fromJSON(data);
|
||||
} else if (this.metricType === TABLE) {
|
||||
// const total = data[0]['total'];
|
||||
const count = data[0]['count'];
|
||||
_data['values'] = data[0]['values'].map((s: any) => new SessionsByRow().fromJson(s, count, this.metricOf));
|
||||
_data['total'] = data[0]['total'];
|
||||
} else {
|
||||
if (data.hasOwnProperty('chart')) {
|
||||
_data['value'] = data.value;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue