Skip to content

Commit

Permalink
chore: set proper option to PieChart config & etc... (#5299)
Browse files Browse the repository at this point in the history
* chore: add optional

Signed-off-by: yuda <[email protected]>

* chore: set proper option to PieChart config

Signed-off-by: yuda <[email protected]>

* chore: hide position dropdown when legend option is disabled

Signed-off-by: yuda <[email protected]>

---------

Signed-off-by: yuda <[email protected]>
  • Loading branch information
yuda110 authored Dec 23, 2024
1 parent 9aa7983 commit 58e081f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const handleSelectPosition = (val: 'right'|'bottom'|'left'|'top') => {
@update:value="handleUpdateToggleValue"
/>
</div>
<p-field-group v-if="props.widgetFieldSchema?.options?.showPositionField"
<p-field-group v-if="state.fieldValue?.toggleValue && props.widgetFieldSchema?.options?.showPositionField"
:label="$t('COMMON.WIDGETS.LEGEND.POSITION')"
style-type="secondary"
class="position-wrapper"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ const queryKey = computed(() => [
dataTableId: state.dataTable?.data_table_id,
dataTableOptions: JSON.stringify(sortObjectByKeys(state.dataTable?.options) ?? {}),
groupBy: [widgetOptionsState.xAxisInfo?.data as string],
count: widgetOptionsState.xAxisInfo.count,
count: widgetOptionsState.xAxisInfo?.count,
},
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const pieChart: WidgetConfig = {
optionalFieldsSchema: {
legend: {
options: {
default: true,
toggle: true,
showPositionField: true,
},
},
Expand Down

0 comments on commit 58e081f

Please sign in to comment.