Slightly improve PlotConfig

This commit is contained in:
Matthias 2023-05-06 15:14:45 +02:00
parent c7986e623b
commit 60620a8103
2 changed files with 3 additions and 6 deletions

View File

@ -20,7 +20,7 @@ import { format } from 'date-fns-tz';
import { computed, onMounted, ref, watch } from 'vue';
import ECharts from 'vue-echarts';
import { calculateDiff, getDiffColumns } from '@/shared/charts/areaPlotDataset';
import { calculateDiff, getDiffColumnsFromPlotConfig } from '@/shared/charts/areaPlotDataset';
import { dataZoomPartial } from '@/shared/charts/chartZoom';
import { EChartsOption, ScatterSeriesOption } from 'echarts';
import { BarChart, CandlestickChart, LineChart, ScatterChart } from 'echarts/charts';
@ -120,7 +120,7 @@ const chartTitle = computed(() => {
});
const diffCols = computed(() => {
return getDiffColumns(props.plotConfig);
return getDiffColumnsFromPlotConfig(props.plotConfig);
});
function updateChart(initial = false) {

View File

@ -23,7 +23,7 @@ export function calculateDiff(
});
}
export function getDiffColumns(plotConfig: PlotConfig): string[][] {
export function getDiffColumnsFromPlotConfig(plotConfig: PlotConfig): string[][] {
const result: string[][] = [];
if ('main_plot' in plotConfig) {
Object.entries(plotConfig.main_plot).forEach(([key, value]) => {
@ -41,8 +41,5 @@ export function getDiffColumns(plotConfig: PlotConfig): string[][] {
});
});
}
console.log('getDiffColumns', result);
return result;
}
export default calculateDiff;