(
seriesModel: BarSeriesModel,
coordSys: Cartesian2D | Polar
)
| 824 | }; |
| 825 | |
| 826 | function 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 | |
| 850 | function updateRealtimeAnimation( |
| 851 | realtimeSortCfg: RealtimeSortConfig, |
no test coverage detected
searching dependent graphs…