MCPcopy
hub / github.com/apache/echarts / shouldRealtimeSort

Function shouldRealtimeSort

src/chart/bar/BarView.ts:826–848  ·  view source on GitHub ↗
(
    seriesModel: BarSeriesModel,
    coordSys: Cartesian2D | Polar
)

Source from the content-addressed store, hash-verified

824};
825
826function shouldRealtimeSort(
827 seriesModel: BarSeriesModel,
828 coordSys: Cartesian2D | Polar
829): RealtimeSortConfig {
830 const realtimeSortOption = seriesModel.get('realtimeSort', true);
831 const baseAxis = coordSys.getBaseAxis() as Axis2D;
832 if (__DEV__) {
833 if (realtimeSortOption) {
834 if (baseAxis.type !== 'category') {
835 warn('`realtimeSort` will not work because this bar series is not based on a category axis.');
836 }
837 if (coordSys.type !== 'cartesian2d') {
838 warn('`realtimeSort` will not work because this bar series is not on cartesian2d.');
839 }
840 }
841 }
842 if (realtimeSortOption && baseAxis.type === 'category' && coordSys.type === 'cartesian2d') {
843 return {
844 baseAxis: baseAxis as Axis2D,
845 otherAxis: coordSys.getOtherAxis(baseAxis)
846 };
847 }
848}
849
850function updateRealtimeAnimation(
851 realtimeSortCfg: RealtimeSortConfig,

Callers 1

_renderNormalMethod · 0.85

Calls 4

warnFunction · 0.90
getBaseAxisMethod · 0.65
getMethod · 0.45
getOtherAxisMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…