Skip to content

Commit

Permalink
chore: minor naming unification (#984)
Browse files Browse the repository at this point in the history
  • Loading branch information
monfera authored Jan 19, 2021
1 parent f06a57a commit dce139a
Show file tree
Hide file tree
Showing 214 changed files with 278 additions and 285 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ Non-breaking changes:

### Bug Fixes

* align series names on splitted series configuration ([#421](https://github.com/elastic/elastic-charts/issues/421)) ([bbecbcc](https://github.com/elastic/elastic-charts/commit/bbecbcc)), closes [#420](https://github.com/elastic/elastic-charts/issues/420)
* align series names on split series configuration ([#421](https://github.com/elastic/elastic-charts/issues/421)) ([bbecbcc](https://github.com/elastic/elastic-charts/commit/bbecbcc)), closes [#420](https://github.com/elastic/elastic-charts/issues/420)

## [13.5.2](https://github.com/elastic/elastic-charts/compare/v13.5.1...v13.5.2) (2019-10-10)

Expand Down Expand Up @@ -1167,7 +1167,7 @@ Non-breaking changes:

### Bug Fixes

* handle splitted series with group value to 0 ([#289](https://github.com/elastic/elastic-charts/issues/289)) ([0f2217e](https://github.com/elastic/elastic-charts/commit/0f2217e)), closes [#288](https://github.com/elastic/elastic-charts/issues/288)
* handle split series with group value to 0 ([#289](https://github.com/elastic/elastic-charts/issues/289)) ([0f2217e](https://github.com/elastic/elastic-charts/commit/0f2217e)), closes [#288](https://github.com/elastic/elastic-charts/issues/288)

# [9.0.0](https://github.com/elastic/elastic-charts/compare/v8.1.8...v9.0.0) (2019-08-05)

Expand Down
2 changes: 1 addition & 1 deletion api/charts.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1979,7 +1979,7 @@ export type YDomainRange = YDomainBase & DomainRange;
// src/chart_types/partition_chart/layout/types/config_types.ts:128:5 - (ae-forgotten-export) The symbol "TimeMs" needs to be exported by the entry point index.d.ts
// src/chart_types/partition_chart/layout/types/config_types.ts:129:5 - (ae-forgotten-export) The symbol "AnimKeyframe" needs to be exported by the entry point index.d.ts
// src/chart_types/partition_chart/specs/index.ts:48:13 - (ae-forgotten-export) The symbol "NodeColorAccessor" needs to be exported by the entry point index.d.ts
// src/commons/series_id.ts:40:3 - (ae-forgotten-export) The symbol "SeriesKey" needs to be exported by the entry point index.d.ts
// src/common/series_id.ts:40:3 - (ae-forgotten-export) The symbol "SeriesKey" needs to be exported by the entry point index.d.ts

// (No @packageDocumentation comment for this package)

Expand Down
12 changes: 6 additions & 6 deletions docs/0-Intro/1-Overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,9 @@ On the current `Visualize Editor`, you can stack or cluster in the following cas

### Multiple charts/Split charts/Small Multiples (phase 2)

Small multiples are created using the `<SmallMultiples>` component, that takes multiple `<SplittedSeries>` component with the usual element inside. `<SplittedSeries>` can contain only `BarSeries` `AreaSeries` and `LineSeries` Axis and other configuration need to be configured outside the `SplittedSeries` element.
Small multiples are created using the `<SmallMultiples>` component, that takes multiple `<SplitSeries>` component with the usual element inside. `<SplitSeries>` can contain only `BarSeries` `AreaSeries` and `LineSeries` Axis and other configuration need to be configured outside the `splitSeries` element.

In the case of small multiples, each `SplittedSeries` computes its own x and y domains. Then the x domains are merged and expanded. The same happens with the main Y domains; they are merged together.
In the case of small multiples, each `splitSeries` computes its own x and y domains. Then the x domains are merged and expanded. The same happens with the main Y domains; they are merged together.

### Color/Style overrides

Expand Down Expand Up @@ -283,7 +283,7 @@ config: {
}
}
```
`textInvertible` will have to be set to true for `textContrast` to be set as well. To see an example of where this applies, please see the Partitions Background story within Stylings. Charts are included below but are static.
`textInvertible` will have to be set to true for `textContrast` to be set as well. To see an example of where this applies, please see the Partitions Background story within Stylings. Charts are included below but are static.
If you have `textInvertible` set to true, but do not have `textContrast` set to true, then the red slices, Europe, North America, and Asia, will have white text:

<Chart className="story-chart">
Expand Down Expand Up @@ -351,10 +351,10 @@ If you have `textInvertible` set to true, but do not have `textContrast` set to
}}
/>
</Chart>



Now if you set the `textContrast` to true as well, these slices also become black in text color:

Now if you set the `textContrast` to true as well, these slices also become black in text color:

<Chart className="story-chart">
<Settings theme={{background : {color: `rgba(155, 155, 155, 1)`}}} />
Expand Down Expand Up @@ -420,4 +420,4 @@ Now if you set the `textContrast` to true as well, these slices also become blac
backgroundColor: 'rgba(229,229,229,1)',
}}
/>
</Chart>
</Chart>
2 changes: 1 addition & 1 deletion src/chart_types/goal_chart/layout/types/config_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { Color } from '../../../../utils/commons';
import { Color } from '../../../../utils/common';
import { Pixels, SizeRatio } from '../../../partition_chart/layout/types/geometry_types';
import { FontFamily } from '../../../partition_chart/layout/types/types';

Expand Down
2 changes: 1 addition & 1 deletion src/chart_types/goal_chart/specs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { ChartTypes } from '../..';
import { Spec } from '../../../specs';
import { SpecTypes } from '../../../specs/constants';
import { getConnect, specComponentFactory } from '../../../state/spec_factory';
import { Color, RecursivePartial } from '../../../utils/commons';
import { Color, RecursivePartial } from '../../../utils/common';
import { config } from '../layout/config/config';
import { Config } from '../layout/types/config_types';
import { defaultGoalSpec } from '../layout/types/viewmodel_types';
Expand Down
2 changes: 1 addition & 1 deletion src/chart_types/goal_chart/state/chart_state.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import React, { RefObject } from 'react';

import { ChartTypes } from '../..';
import { LegendItem } from '../../../commons/legend';
import { LegendItem } from '../../../common/legend';
import { Tooltip } from '../../../components/tooltip';
import { InternalChartState, GlobalChartState, BackwardRef } from '../../../state/chart_state';
import { InitStatus } from '../../../state/selectors/get_internal_is_intialized';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import createCachedSelector from 're-reselect';
import { Selector } from 'reselect';

import { ChartTypes } from '../../..';
import { SeriesIdentifier } from '../../../../commons/series_id';
import { SeriesIdentifier } from '../../../../common/series_id';
import { SettingsSpec, LayerValue } from '../../../../specs';
import { GlobalChartState, PointerState } from '../../../../state/chart_state';
import { getChartIdSelector } from '../../../../state/selectors/get_chart_id';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import createCachedSelector from 're-reselect';
import { Selector } from 'react-redux';

import { ChartTypes } from '../../..';
import { SeriesIdentifier } from '../../../../commons/series_id';
import { SeriesIdentifier } from '../../../../common/series_id';
import { LayerValue } from '../../../../specs';
import { GlobalChartState } from '../../../../state/chart_state';
import { getChartIdSelector } from '../../../../state/selectors/get_chart_id';
Expand Down
2 changes: 1 addition & 1 deletion src/chart_types/goal_chart/state/selectors/scenegraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { mergePartial, RecursivePartial } from '../../../../utils/commons';
import { mergePartial, RecursivePartial } from '../../../../utils/common';
import { Dimensions } from '../../../../utils/dimensions';
import { measureText } from '../../../partition_chart/layout/utils/measure';
import { config as defaultConfig } from '../../layout/config/config';
Expand Down
2 changes: 1 addition & 1 deletion src/chart_types/heatmap/layout/types/config_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { Color } from '../../../../utils/commons';
import { Color } from '../../../../utils/common';
import { Pixels, SizeRatio } from '../../../partition_chart/layout/types/geometry_types';
import { Font, FontFamily, TextAlign, TextBaseline } from '../../../partition_chart/layout/types/types';
import { Cell } from './viewmodel_types';
Expand Down
4 changes: 2 additions & 2 deletions src/chart_types/heatmap/specs/heatmap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ import { SeriesScales, Spec } from '../../../specs';
import { SpecTypes } from '../../../specs/constants';
import { getConnect, specComponentFactory } from '../../../state/spec_factory';
import { Accessor, AccessorFn } from '../../../utils/accessor';
import { Color, Datum, RecursivePartial } from '../../../utils/commons';
import { Color, Datum, RecursivePartial } from '../../../utils/common';
import { config } from '../layout/config/config';
import { Config } from '../layout/types/config_types';
import { Predicate } from '../utils/commons';
import { Predicate } from '../utils/common';

const defaultProps = {
chartType: ChartTypes.Heatmap,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { GlobalChartState } from '../../../../state/chart_state';
import { getChartIdSelector } from '../../../../state/selectors/get_chart_id';
import { getLegendSizeSelector } from '../../../../state/selectors/get_legend_size';
import { getSettingsSpecSelector } from '../../../../state/selectors/get_settings_specs';
import { Position } from '../../../../utils/commons';
import { Position } from '../../../../utils/common';
import { Dimensions } from '../../../../utils/dimensions';
import { Box } from '../../../partition_chart/layout/types/types';
import { measureText } from '../../../partition_chart/layout/utils/measure';
Expand Down
2 changes: 1 addition & 1 deletion src/chart_types/heatmap/state/selectors/compute_legend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import createCachedSelector from 're-reselect';

import { LegendItem } from '../../../../commons/legend';
import { LegendItem } from '../../../../common/legend';
import { getChartIdSelector } from '../../../../state/selectors/get_chart_id';
import { getDeselectedSeriesSelector } from '../../../../state/selectors/get_deselected_data_series';
import { getColorScale } from './get_color_scale';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import createCachedSelector from 're-reselect';

import { getChartIdSelector } from '../../../../state/selectors/get_chart_id';
import { mergePartial } from '../../../../utils/commons';
import { mergePartial } from '../../../../utils/common';
import { config as defaultConfig } from '../../layout/config/config';
import { Config } from '../../layout/types/config_types';
import { getHeatmapSpecSelector } from './get_heatmap_spec';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { getChartIdSelector } from '../../../../state/selectors/get_chart_id';
import { getSettingsSpecSelector } from '../../../../state/selectors/get_settings_specs';
import { getAccessorValue } from '../../../../utils/accessor';
import { mergeXDomain } from '../../../xy_chart/domains/x_domain';
import { getPredicateFn } from '../../utils/commons';
import { getPredicateFn } from '../../utils/common';
import { HeatmapTable } from './compute_chart_dimensions';
import { getHeatmapSpecSelector } from './get_heatmap_spec';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import createCachedSelector from 're-reselect';
import { Selector } from 'reselect';

import { ChartTypes } from '../../..';
import { SeriesIdentifier } from '../../../../commons/series_id';
import { SeriesIdentifier } from '../../../../common/series_id';
import { SettingsSpec } from '../../../../specs';
import { GlobalChartState, PointerState } from '../../../../state/chart_state';
import { getLastClickSelector } from '../../../../state/selectors/get_last_click';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import createCachedSelector from 're-reselect';
import { Selector } from 'react-redux';

import { ChartTypes } from '../../..';
import { SeriesIdentifier } from '../../../../commons/series_id';
import { SeriesIdentifier } from '../../../../common/series_id';
import { GlobalChartState } from '../../../../state/chart_state';
import { getChartIdSelector } from '../../../../state/selectors/get_chart_id';
import { getSettingsSpecSelector } from '../../../../state/selectors/get_settings_specs';
Expand Down
2 changes: 1 addition & 1 deletion src/chart_types/heatmap/state/selectors/scenegraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import { SettingsSpec } from '../../../../specs';
import { RecursivePartial, mergePartial } from '../../../../utils/commons';
import { RecursivePartial, mergePartial } from '../../../../utils/common';
import { Dimensions } from '../../../../utils/dimensions';
import { measureText } from '../../../partition_chart/layout/utils/measure';
import { config as defaultConfig } from '../../layout/config/config';
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import { $Values as Values } from 'utility-types';

import { Color, StrokeStyle, ValueFormatter } from '../../../../utils/commons';
import { Color, StrokeStyle, ValueFormatter } from '../../../../utils/common';
import { PerSideDistance } from '../../../../utils/dimensions';
import { Distance, Pixels, Radian, Radius, Ratio, SizeRatio, TimeMs } from './geometry_types';
import { Font, FontFamily, PartialFont } from './types';
Expand Down
2 changes: 1 addition & 1 deletion src/chart_types/partition_chart/layout/types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { Datum } from '../../../../utils/commons';
import { Datum } from '../../../../utils/common';
import { ArrayEntry } from '../utils/group_by_rollup';

export const FONT_VARIANTS = Object.freeze(['normal', 'small-caps'] as const);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
* under the License.
*/

import { CategoryKey } from '../../../../commons/category';
import { CategoryKey } from '../../../../common/category';
import { LegendPath } from '../../../../state/actions/legend';
import { Color } from '../../../../utils/commons';
import { Color } from '../../../../utils/common';
import { config, ValueGetterName } from '../config/config';
import { ArrayNode, HierarchyOfArrays } from '../utils/group_by_rollup';
import { VerticalAlignments } from '../viewmodel/constants';
Expand Down
2 changes: 1 addition & 1 deletion src/chart_types/partition_chart/layout/utils/calcs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import chroma from 'chroma-js';

import { Color } from '../../../../utils/commons';
import { Color } from '../../../../utils/common';
import { TextContrast } from '../types/config_types';
import { Ratio } from '../types/geometry_types';
import { RgbTuple, RGBATupleToString, stringToRGB } from './color_library_wrappers';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import chroma from 'chroma-js';
import { rgb as d3Rgb, RGBColor as D3RGBColor } from 'd3-color';

import { Color } from '../../../../utils/commons';
import { Color } from '../../../../utils/common';

type RGB = number;
type A = number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
* under the License.
*/

import { CategoryKey } from '../../../../commons/category';
import { CategoryKey } from '../../../../common/category';
import { LegendPath } from '../../../../state/actions/legend';
import { Datum } from '../../../../utils/commons';
import { Datum } from '../../../../utils/common';
import { Relation } from '../types/types';

export const AGGREGATE_KEY = 'value';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import chroma from 'chroma-js';

import { ValueFormatter, Color } from '../../../../utils/commons';
import { ValueFormatter, Color } from '../../../../utils/common';
import { Logger } from '../../../../utils/logger';
import { Layer } from '../../specs';
import { conjunctiveConstraint } from '../circline_geometry';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import { IndexedAccessorFn } from '../../../../utils/accessor';
import { ValueAccessor } from '../../../../utils/commons';
import { ValueAccessor } from '../../../../utils/common';
import { Relation } from '../types/types';
import {
HierarchyOfArrays,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { ValueFormatter, Color } from '../../../../utils/commons';
import { ValueFormatter, Color } from '../../../../utils/common';
import { Point } from '../../../../utils/point';
import { meanAngle } from '../geometry';
import { Config } from '../types/config_types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { StrokeStyle, ValueFormatter, Color } from '../../../../utils/commons';
import { StrokeStyle, ValueFormatter, Color } from '../../../../utils/common';
import { Layer } from '../../specs';
import { percentValueGetter } from '../config/config';
import { meanAngle } from '../geometry';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import { clearCanvas, renderLayers, withContext } from '../../../../renderers/canvas';
import { Color } from '../../../../utils/commons';
import { Color } from '../../../../utils/common';
import { Pixels } from '../../layout/types/geometry_types';
import {
LinkLabelVM,
Expand Down
2 changes: 1 addition & 1 deletion src/chart_types/partition_chart/specs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {
ShowAccessor,
ValueAccessor,
ValueFormatter,
} from '../../../utils/commons';
} from '../../../utils/common';
import { config, percentFormatter } from '../layout/config/config';
import { Config, FillFontSizeRange, FillLabelConfig } from '../layout/types/config_types';
import { Pixels } from '../layout/types/geometry_types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@

import createCachedSelector from 're-reselect';

import { CategoryKey } from '../../../../commons/category';
import { LegendItem } from '../../../../commons/legend';
import { CategoryKey } from '../../../../common/category';
import { LegendItem } from '../../../../common/legend';
import { getChartIdSelector } from '../../../../state/selectors/get_chart_id';
import { getSettingsSpecSelector } from '../../../../state/selectors/get_settings_specs';
import { identity } from '../../../../utils/commons';
import { identity } from '../../../../utils/common';
import { isHierarchicalLegend } from '../../../../utils/legend';
import { QuadViewModel } from '../../layout/types/viewmodel_types';
import { map } from '../iterables';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import createCachedSelector from 're-reselect';
import { Selector } from 'reselect';

import { ChartTypes } from '../../..';
import { SeriesIdentifier } from '../../../../commons/series_id';
import { SeriesIdentifier } from '../../../../common/series_id';
import { SettingsSpec, LayerValue } from '../../../../specs';
import { GlobalChartState, PointerState } from '../../../../state/chart_state';
import { getLastClickSelector } from '../../../../state/selectors/get_last_click';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import createCachedSelector from 're-reselect';
import { Selector } from 'react-redux';

import { ChartTypes } from '../../..';
import { SeriesIdentifier } from '../../../../commons/series_id';
import { SeriesIdentifier } from '../../../../common/series_id';
import { LayerValue } from '../../../../specs';
import { GlobalChartState } from '../../../../state/chart_state';
import { getChartIdSelector } from '../../../../state/selectors/get_chart_id';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { identity, mergePartial, RecursivePartial, Color } from '../../../../utils/commons';
import { identity, mergePartial, RecursivePartial, Color } from '../../../../utils/common';
import { Dimensions } from '../../../../utils/dimensions';
import { config as defaultConfig, VALUE_GETTERS } from '../../layout/config/config';
import { Config } from '../../layout/types/config_types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { MockAnnotationLineProps } from '../../../../mocks/annotations/annotatio
import { MockAnnotationSpec, MockGlobalSpec, MockSeriesSpec } from '../../../../mocks/specs';
import { MockStore } from '../../../../mocks/store';
import { ScaleType } from '../../../../scales/constants';
import { Position } from '../../../../utils/commons';
import { Position } from '../../../../utils/common';
import { AnnotationId } from '../../../../utils/ids';
import { DEFAULT_ANNOTATION_LINE_STYLE } from '../../../../utils/themes/theme';
import { computeAnnotationDimensionsSelector } from '../../state/selectors/compute_annotations';
Expand Down
2 changes: 1 addition & 1 deletion src/chart_types/xy_chart/annotations/line/dimensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import { Line } from '../../../../geoms/types';
import { Scale } from '../../../../scales';
import { isContinuousScale, isBandScale } from '../../../../scales/types';
import { isNil, Position, Rotation } from '../../../../utils/commons';
import { isNil, Position, Rotation } from '../../../../utils/common';
import { Dimensions, Size } from '../../../../utils/dimensions';
import { GroupId } from '../../../../utils/ids';
import { SmallMultipleScales } from '../../state/selectors/compute_small_multiple_scales';
Expand Down
2 changes: 1 addition & 1 deletion src/chart_types/xy_chart/annotations/line/line.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { MockAnnotationSpec, MockGlobalSpec, MockSeriesSpec } from '../../../../
import { MockStore } from '../../../../mocks/store';
import { ScaleType } from '../../../../scales/constants';
import { GlobalChartState } from '../../../../state/chart_state';
import { Position } from '../../../../utils/commons';
import { Position } from '../../../../utils/common';
import { DEFAULT_ANNOTATION_LINE_STYLE } from '../../../../utils/themes/theme';
import { computeAnnotationDimensionsSelector } from '../../state/selectors/compute_annotations';
import { AnnotationDomainTypes } from '../../utils/specs';
Expand Down
Loading

0 comments on commit dce139a

Please sign in to comment.