Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/

Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
export * from "./SegmentLabel";
export * from './SegmentLabel';
Original file line number Diff line number Diff line change
Expand Up @@ -355,4 +355,4 @@ export const topEventsFeatureMatrixData = [
isTopItem: true,
},
...multipleSegmentFeatureMatrixData.map((d) => ({ ...d, isSegmentData: true })),
];
];
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,4 @@ OnClick.args = {
color: 'operatingSystem',
};

export {
Color,
DodgedStacked,
DodgedStackedWithLabels,
LineType,
Opacity,
Popover,
OnClick,
};
export { Color, DodgedStacked, DodgedStackedWithLabels, LineType, Opacity, Popover, OnClick };
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
* governing permissions and limitations under the License.
*/
import { Legend } from '../../../components';

import { LegendBarStory, defaultProps } from './LegendStoryUtils';

export default {
Expand Down
4 changes: 2 additions & 2 deletions packages/react-spectrum-charts/src/stories/data/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1057,8 +1057,8 @@ export const simpleSparklineData = [
{ x: 17, y: 70 },
{ x: 18, y: 35 },
{ x: 19, y: 55 },
{ x: 20, y: 90 }
]
{ x: 20, y: 90 },
];

export const peopleAdoptionComboData = [
{ datetime: 1667890800000, people: 10, adoptionRate: 0.2 },
Expand Down
1 change: 0 additions & 1 deletion packages/themes/src/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/

import { getColorValue } from './utils';

describe('getColorValue()', () => {
Expand Down
1 change: 0 additions & 1 deletion packages/themes/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/

import { spectrumColors } from './spectrumColors';

/**
Expand Down
10 changes: 5 additions & 5 deletions packages/vega-spec-builder/src/bar/barUtils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -507,23 +507,23 @@ describe('barUtils', () => {
const options: BarSpecOptions = {
...defaultBarOptions,
metricAxis: 'customScaleName',
orientation: 'vertical'
orientation: 'vertical',
};
expect(getBaseScaleName(options)).toEqual('customScaleName');
});

test('should return metricScaleKey from orientation properties if metricAxis is not provided (vertical)', () => {
const options: BarSpecOptions = {
...defaultBarOptions,
orientation: 'vertical'
orientation: 'vertical',
};
expect(getBaseScaleName(options)).toEqual('yLinear');
});

test('should return metricScaleKey from orientation properties if metricAxis is not provided (horizontal)', () => {
const options: BarSpecOptions = {
...defaultBarOptions,
orientation: 'horizontal'
orientation: 'horizontal',
};
expect(getBaseScaleName(options)).toEqual('xLinear');
});
Expand All @@ -532,7 +532,7 @@ describe('barUtils', () => {
const options: BarSpecOptions = {
...defaultBarOptions,
metricAxis: undefined,
orientation: 'vertical'
orientation: 'vertical',
};
expect(getBaseScaleName(options)).toEqual('yLinear');
});
Expand All @@ -541,7 +541,7 @@ describe('barUtils', () => {
const options: BarSpecOptions = {
...defaultBarOptions,
metricAxis: '',
orientation: 'horizontal'
orientation: 'horizontal',
};
expect(getBaseScaleName(options)).toEqual('xLinear');
});
Expand Down
10 changes: 6 additions & 4 deletions packages/vega-spec-builder/src/scale/scaleSpecBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,12 @@ export const getScaleIndexByType = (
let index = scales.findIndex((scale) => scale.name === name);
if (index === -1) {
index = scales.length;
scales.push(generateScale(type, axis, {
name,
...(domainDataKey ? { domain: { data: domainDataKey, fields: [] } } : {}),
}));
scales.push(
generateScale(type, axis, {
name,
...(domainDataKey ? { domain: { data: domainDataKey, fields: [] } } : {}),
})
);
}
return index;
};
Expand Down
11 changes: 5 additions & 6 deletions packages/vega-spec-builder/src/scale/scaleUtils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/

import { getDualAxisScaleNames } from './scaleUtils';

describe('getDualAxisScaleNames()', () => {
Expand All @@ -19,7 +18,7 @@ describe('getDualAxisScaleNames()', () => {
primaryScale: 'xLinearPrimary',
secondaryScale: 'xLinearSecondary',
primaryDomain: 'xLinearPrimaryDomain',
secondaryDomain: 'xLinearSecondaryDomain'
secondaryDomain: 'xLinearSecondaryDomain',
});
});

Expand All @@ -29,7 +28,7 @@ describe('getDualAxisScaleNames()', () => {
primaryScale: 'yLinearPrimary',
secondaryScale: 'yLinearSecondary',
primaryDomain: 'yLinearPrimaryDomain',
secondaryDomain: 'yLinearSecondaryDomain'
secondaryDomain: 'yLinearSecondaryDomain',
});
});

Expand All @@ -39,7 +38,7 @@ describe('getDualAxisScaleNames()', () => {
primaryScale: 'customScalePrimary',
secondaryScale: 'customScaleSecondary',
primaryDomain: 'customScalePrimaryDomain',
secondaryDomain: 'customScaleSecondaryDomain'
secondaryDomain: 'customScaleSecondaryDomain',
});
});

Expand All @@ -49,7 +48,7 @@ describe('getDualAxisScaleNames()', () => {
primaryScale: 'Primary',
secondaryScale: 'Secondary',
primaryDomain: 'PrimaryDomain',
secondaryDomain: 'SecondaryDomain'
secondaryDomain: 'SecondaryDomain',
});
});
});
});
8 changes: 4 additions & 4 deletions packages/vega-spec-builder/src/scale/scaleUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
* @returns Object containing all scale names needed for dual axis configuration
*/
export function getDualAxisScaleNames(baseScaleName: string) {
const primaryScaleName = `${baseScaleName}Primary`;
const secondaryScaleName = `${baseScaleName}Secondary`;
const primaryScaleName = `${baseScaleName}Primary`;
const secondaryScaleName = `${baseScaleName}Secondary`;
return {
primaryScale: primaryScaleName,
secondaryScale: secondaryScaleName,
primaryDomain: `${primaryScaleName}Domain`,
secondaryDomain: `${secondaryScaleName}Domain`
secondaryDomain: `${secondaryScaleName}Domain`,
};
}
}