Skip to content

Commit

Permalink
fix: analytics-chart sandbox empty state toggle was confusing
Browse files Browse the repository at this point in the history
  • Loading branch information
filipgutica committed Sep 13, 2023
1 parent f84da6e commit 45d2535
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/analytics/analytics-chart/sandbox/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@
</div>
<div>
<KInputSwitch
v-model="showTableData"
:label="showTableData ? 'Empty State' : 'Chart Has Data'"
v-model="emptyState"
:label="emptyState ? 'Empty State' : 'Chart Has Data'"
/>
</div>
</div>
Expand Down Expand Up @@ -328,7 +328,7 @@ const limitToggle = ref(false)
const multiDimensionToggle = ref(false)
const showAnnotationsToggle = ref(true)
const showLegendValuesToggle = ref(true)
const showTableData = ref(false)
const emptyState = ref(false)
const chartType = ref<ChartTypes | ChartTypesSimple>(ChartTypes.VERTICAL_BAR)
const legendPosition = ref(ChartLegendPosition.Right)
const metricDisplay = ref(ChartMetricDisplay.SingleMetric)
Expand Down Expand Up @@ -361,7 +361,7 @@ const serviceDimensionValues = ref(new Set([
'service1', 'service2', 'service3', 'service4', 'service5',
]))
const exploreResult = computed<AnalyticsExploreV2Result | null>(() => {
if (showTableData.value) {
if (emptyState.value) {
return null
}
Expand Down Expand Up @@ -484,7 +484,7 @@ const exploreResult = computed<AnalyticsExploreV2Result | null>(() => {
}
})
const exploreResultV3 = computed(() => {
if (!showTableData.value) {
if (emptyState.value) {
return {
meta: {},
records: [],
Expand Down

0 comments on commit 45d2535

Please sign in to comment.