diff --git a/src/app/js/formats/vega-lite/component/bar-chart/BarChartAdmin.js b/src/app/js/formats/vega-lite/component/bar-chart/BarChartAdmin.js index da8e658c5..3f24772b2 100644 --- a/src/app/js/formats/vega-lite/component/bar-chart/BarChartAdmin.js +++ b/src/app/js/formats/vega-lite/component/bar-chart/BarChartAdmin.js @@ -22,7 +22,6 @@ import { AXIS_X, AXIS_Y, lodexDirectionToIdDirection, - lodexOrderToIdOrder, lodexScaleToIdScale, } from '../../../chartsUtils'; import VegaAdvancedMode from '../../../shared/VegaAdvancedMode'; @@ -89,7 +88,6 @@ const BarChartAdmin = props => { const specBuilder = new BarChart(); specBuilder.setAxisDirection(lodexDirectionToIdDirection(direction)); - specBuilder.setOrderBy(lodexOrderToIdOrder(params.orderBy)); specBuilder.setScale(lodexScaleToIdScale(scale)); specBuilder.setColor(colors); specBuilder.setRoundValue(axisRoundValue); diff --git a/src/app/js/formats/vega-lite/component/bar-chart/BarChartView.js b/src/app/js/formats/vega-lite/component/bar-chart/BarChartView.js index 4b7bf7a7d..3de05fd2d 100644 --- a/src/app/js/formats/vega-lite/component/bar-chart/BarChartView.js +++ b/src/app/js/formats/vega-lite/component/bar-chart/BarChartView.js @@ -8,7 +8,6 @@ import { AXIS_X, AXIS_Y, lodexDirectionToIdDirection, - lodexOrderToIdOrder, lodexScaleToIdScale, VEGA_LITE_DATA_INJECT_TYPE_A, } from '../../../chartsUtils'; @@ -64,7 +63,6 @@ const BarChartView = ({ specBuilder.setAxisDirection(lodexDirectionToIdDirection(direction)); - specBuilder.setOrderBy(lodexOrderToIdOrder(params.orderBy)); specBuilder.setScale(lodexScaleToIdScale(scale)); specBuilder.setColor(colors); specBuilder.setRoundValue(axisRoundValue); diff --git a/src/app/js/formats/vega-lite/models/BarChart.js b/src/app/js/formats/vega-lite/models/BarChart.js index 169a5b897..02f7ac425 100644 --- a/src/app/js/formats/vega-lite/models/BarChart.js +++ b/src/app/js/formats/vega-lite/models/BarChart.js @@ -5,12 +5,8 @@ import { AXIS_VERTICAL, AXIS_X, AXIS_Y, - LABEL_ASC, - LABEL_DESC, SCALE_LINEAR, SCALE_LOG, - VALUES_ASC, - VALUES_DESC, } from '../../chartsUtils'; import { VEGA_ACTIONS_WIDTH } from '../component/vega-lite-component/VegaLiteComponent'; import BasicChart from './BasicChart'; @@ -45,7 +41,6 @@ class BarChart extends BasicChart { x: AXIS_NOMINAL, y: AXIS_QUANTITATIVE, }; - this.orderBy = VALUES_ASC; this.direction = AXIS_HORIZONTAL; this.size = 20; this.round = false; @@ -154,14 +149,6 @@ class BarChart extends BasicChart { } } - /** - * Change the value order - * @param orderBy order wanted (use factoryUtils const) [default value: VALUES_ASC] - */ - setOrderBy(orderBy) { - this.orderBy = orderBy; - } - /** * Change axis direction (swap x and y values) * @param axisDirection direction wanted (use factoryUtils const) [default value: AXIS_VERTICAL] @@ -187,26 +174,10 @@ class BarChart extends BasicChart { model.encoding.x.axis.labelAngle = this.labelAngle.x; model.encoding.y.axis.labelAngle = this.labelAngle.y; - switch (this.orderBy) { - case VALUES_ASC: - labelsModel.encoding.y.sort = model.encoding.x.sort = - this.direction === AXIS_VERTICAL ? 'y' : 'x'; - break; - case VALUES_DESC: - labelsModel.encoding.y.sort = model.encoding.x.sort = - this.direction === AXIS_VERTICAL ? '-y' : '-x'; - break; - case LABEL_ASC: - labelsModel.encoding.y.sort = model.encoding.x.sort = - this.direction === AXIS_VERTICAL ? 'x' : 'y'; - break; - case LABEL_DESC: - labelsModel.encoding.y.sort = model.encoding.x.sort = - this.direction === AXIS_VERTICAL ? '-x' : '-y'; - break; - default: - break; - } + labelsModel.encoding.x.sort = null; + labelsModel.encoding.y.sort = null; + model.encoding.x.sort = null; + model.encoding.y.sort = null; if (this.labelOverlap) { model.encoding.x.axis.labelOverlap = true;