Skip to content

Commit bfa70eb

Browse files
committed
Automated Optimize imports and Prettier
1 parent 31101ee commit bfa70eb

10 files changed

+36
-33
lines changed

src/base/bubble-mixin.ts

+8-10
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,10 @@ export function BubbleMixin<TBase extends Constructor<MinimalBase>>(Base: TBase)
202202
.attr('opacity', 0)
203203
.attr('pointer-events', d => this._labelPointerEvent(d))
204204
.text(d => this._labelFunction(d));
205-
transition(
206-
label,
207-
this._conf.transitionDuration,
208-
this._conf.transitionDelay
209-
).attr('opacity', d => this._labelOpacity(d));
205+
transition(label, this._conf.transitionDuration, this._conf.transitionDelay).attr(
206+
'opacity',
207+
d => this._labelOpacity(d)
208+
);
210209
}
211210
}
212211

@@ -219,11 +218,10 @@ export function BubbleMixin<TBase extends Constructor<MinimalBase>>(Base: TBase)
219218
.select('text')
220219
.attr('pointer-events', d => this._labelPointerEvent(d))
221220
.text(d => this._labelFunction(d));
222-
transition(
223-
labels,
224-
this._conf.transitionDuration,
225-
this._conf.transitionDelay
226-
).attr('opacity', d => this._labelOpacity(d));
221+
transition(labels, this._conf.transitionDuration, this._conf.transitionDelay).attr(
222+
'opacity',
223+
d => this._labelOpacity(d)
224+
);
227225
}
228226
}
229227

src/charts/bubble-chart.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
import { BubbleMixin } from '../base/bubble-mixin.js';
22
import { CoordinateGridMixin } from '../base/coordinate-grid-mixin.js';
33
import { transition } from '../core/core.js';
4-
import { BaseAccessor, ChartGroupType, ChartParentType, SVGGElementSelection } from '../core/types.js';
4+
import {
5+
BaseAccessor,
6+
ChartGroupType,
7+
ChartParentType,
8+
SVGGElementSelection,
9+
} from '../core/types.js';
510

611
/**
712
* A concrete implementation of a general purpose bubble chart that allows data visualization using the

src/charts/composite-chart.ts

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { CoordinateGridMixin } from '../base/coordinate-grid-mixin.js';
77
import {
88
ChartGroupType,
99
ChartParentType,
10-
Margins,
1110
MinimalXYScale,
1211
SVGGElementSelection,
1312
} from '../core/types.js';

src/charts/data-table.ts

+4-6
Original file line numberDiff line numberDiff line change
@@ -211,12 +211,10 @@ export class DataTable extends BaseMixin {
211211
.selectAll<HTMLTableRowElement, any>(`tr.${ROW_CSS_CLASS}`)
212212
.data(d => d.values);
213213

214-
const rowEnter: Selection<
215-
HTMLTableRowElement,
216-
unknown,
217-
HTMLTableSectionElement,
218-
any
219-
> = rows.enter().append('tr').attr('class', ROW_CSS_CLASS);
214+
const rowEnter: Selection<HTMLTableRowElement, unknown, HTMLTableSectionElement, any> = rows
215+
.enter()
216+
.append('tr')
217+
.attr('class', ROW_CSS_CLASS);
220218

221219
this._conf.columns.forEach((v, i) => {
222220
rowEnter

src/charts/pie-chart.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ import { interpolate } from 'd3-interpolate';
66
import { ColorMixin } from '../base/color-mixin.js';
77
import { BaseMixin } from '../base/base-mixin.js';
88
import { transition } from '../core/core.js';
9-
import { ChartGroupType, ChartParentType, LegendItem, SVGGElementSelection } from '../core/types.js';
9+
import {
10+
ChartGroupType,
11+
ChartParentType,
12+
LegendItem,
13+
SVGGElementSelection,
14+
} from '../core/types.js';
1015
import { IPieChartConf } from './i-pie-chart-conf.js';
1116
import { SimpleDataCapHelper } from '../data/index.js';
1217

src/charts/sunburst-chart.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@ import { ColorMixin } from '../base/color-mixin.js';
1111
import { BaseMixin } from '../base/base-mixin.js';
1212
import { constants } from '../core/constants.js';
1313
import { BadArgumentException } from '../core/bad-argument-exception.js';
14-
import { ChartGroupType, ChartParentType, LegendItem, SVGGElementSelection } from '../core/types.js';
14+
import {
15+
ChartGroupType,
16+
ChartParentType,
17+
LegendItem,
18+
SVGGElementSelection,
19+
} from '../core/types.js';
1520
import { ISunburstChartConf, RingSizeSpecs } from './i-sunburst-chart-conf.js';
1621
import { HierarchyFilter } from '../core/filters/hierarchy-filter.js';
1722

src/core/filter-storage.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,7 @@ export class FilterStorage implements IFilterStorage {
111111
if (listener) {
112112
const filters = this._filters.get(listener.storageKey);
113113
if (filters && filters.length > 0) {
114-
return this._serializeFilters(
115-
listener.dimId,
116-
listener.dimLabel,
117-
filters
118-
);
114+
return this._serializeFilters(listener.dimId, listener.dimLabel, filters);
119115
}
120116
}
121117
return undefined;

src/data/base-data-adapter.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { ISimpleDataAdapterConf } from './i-simple-data-adapter-conf.js';
22
import { IDataProviderBehavior } from './i-data-provider-behavior.js';
3-
import { cfDataProviderBehavior } from './cf-data-provider-behavior.js';
43

54
export class BaseDataAdapter {
65
protected _conf: ISimpleDataAdapterConf;

src/data/index.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ export * from './cf-data-provider-behavior.js';
88
export * from './i-simple-data-adapter-conf.js';
99

1010
// TODO: remove after examples and documentation are updated
11-
export {SimpleDataAdapter as CFSimpleAdapter } from './simple-data-adapter.js';
12-
export {MultiDataAdapter as CFMultiAdapter } from './multi-data-adapter.js';
13-
export {SimpleDataCapHelper as CFDataCapHelper } from './simple-data-cap-helper.js';
11+
export { SimpleDataAdapter as CFSimpleAdapter } from './simple-data-adapter.js';
12+
export { MultiDataAdapter as CFMultiAdapter } from './multi-data-adapter.js';
13+
export { SimpleDataCapHelper as CFDataCapHelper } from './simple-data-cap-helper.js';

src/data/simple-data-adapter.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,10 @@ export class SimpleDataAdapter extends FilterStorageHelper {
2323
// TODO: better typing
2424
public data(): any {
2525
const { dimension, group, chartId, valueAccessor } = this._conf;
26-
return this._getData({dimension, group, chartId, valueAccessor});
26+
return this._getData({ dimension, group, chartId, valueAccessor });
2727
}
2828

29-
protected _getData(
30-
{dimension, group, chartId, valueAccessor}: IGetDataParams
31-
) {
29+
protected _getData({ dimension, group, chartId, valueAccessor }: IGetDataParams) {
3230
// create a two-level deep copy defensively
3331
return this.providerBehavior
3432
.getGroupings(dimension, group, chartId)

0 commit comments

Comments
 (0)