Add drill down for compose chart page block
This commit is contained in:
@@ -3,18 +3,28 @@ import { Apply, CortezaID, NoID } from '../../../cast'
|
||||
|
||||
const kind = 'Chart'
|
||||
|
||||
interface DrillDown {
|
||||
enabled: boolean;
|
||||
blockID?: string;
|
||||
}
|
||||
|
||||
interface Options {
|
||||
chartID: string;
|
||||
refreshRate: number;
|
||||
showRefresh: boolean;
|
||||
magnifyOption: string;
|
||||
drillDown: DrillDown;
|
||||
}
|
||||
|
||||
const defaults: Readonly<Options> = Object.freeze({
|
||||
chartID: NoID,
|
||||
chartID: '',
|
||||
refreshRate: 0,
|
||||
magnifyOption: '',
|
||||
showRefresh: false,
|
||||
magnifyOption: '',
|
||||
drillDown: {
|
||||
enabled: false,
|
||||
blockID: ''
|
||||
}
|
||||
})
|
||||
|
||||
export class PageBlockChart extends PageBlock {
|
||||
@@ -30,10 +40,15 @@ export class PageBlockChart extends PageBlock {
|
||||
applyOptions (o?: Partial<Options>): void {
|
||||
if (!o) return
|
||||
|
||||
Apply(this.options, o, CortezaID, 'chartID')
|
||||
o.chartID = o.chartID === NoID ? '' : o.chartID
|
||||
|
||||
Apply(this.options, o, String, 'chartID', 'magnifyOption')
|
||||
Apply(this.options, o, Number, 'refreshRate')
|
||||
Apply(this.options, o, Boolean, 'showRefresh')
|
||||
Apply(this.options, o, String, 'magnifyOption')
|
||||
|
||||
if (o.drillDown) {
|
||||
this.options.drillDown = o.drillDown
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ interface Options {
|
||||
hideHeader: boolean;
|
||||
hideAddButton: boolean;
|
||||
hideImportButton: boolean;
|
||||
hideConfigureFieldsButton: boolean;
|
||||
hideSearch: boolean;
|
||||
hidePaging: boolean;
|
||||
hideSorting: boolean;
|
||||
@@ -62,6 +63,7 @@ const defaults: Readonly<Options> = Object.freeze({
|
||||
hideHeader: false,
|
||||
hideAddButton: false,
|
||||
hideImportButton: false,
|
||||
hideConfigureFieldsButton: true,
|
||||
hideSearch: false,
|
||||
hidePaging: false,
|
||||
hideSorting: false,
|
||||
@@ -130,6 +132,7 @@ export class PageBlockRecordList extends PageBlock {
|
||||
'hideHeader',
|
||||
'hideAddButton',
|
||||
'hideImportButton',
|
||||
'hideConfigureFieldsButton',
|
||||
'hideSearch',
|
||||
'hidePaging',
|
||||
'fullPageNavigation',
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
:theme="theme"
|
||||
autoresize
|
||||
class="position-absolute w-100 h-100 overflow-hidden"
|
||||
v-on="$listeners"
|
||||
/>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user