Skip to content

Commit

Permalink
fix(deploy): update import paths in DataByYearAndAgeGroupCard and uti…
Browse files Browse the repository at this point in the history
…ls for consistency
  • Loading branch information
jalezi committed Nov 27, 2024
1 parent f3f961b commit 9343488
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import HighMaps from 'highcharts/highmaps';
import HighchartsReact from 'highcharts-react-official';
import heatmap from 'highcharts/modules/heatmap';

import { byAgeGroupMap, DATA } from 'pages/Analytics/data/fake-data';
import { byAgeGroupMap, DATA } from '../../data/fake-data';

Check failure on line 15 in src/pages/Analytics/Cards/DataByYearAndAgeGroupCard/index.js

View workflow job for this annotation

GitHub Actions / test

Unable to resolve path to module '../../data/fake-data'

Check failure on line 15 in src/pages/Analytics/Cards/DataByYearAndAgeGroupCard/index.js

View workflow job for this annotation

GitHub Actions / test

Missing file extension for "../../data/fake-data"

import { mapOptions, chartOptions } from './char-options';
import { filterDataByYearAndAgeGroup, renderChart } from './utils';
Expand Down
3 changes: 2 additions & 1 deletion src/pages/Analytics/Cards/DataByYearAndAgeGroupCard/utils.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/** @import * as DataTypes from "./data" */

import Highcharts from 'highcharts';
import { byAgeGroupMap, DATA } from 'pages/Analytics/data/fake-data';

import { byAgeGroupMap, DATA } from '../../data/fake-data';

Check failure on line 5 in src/pages/Analytics/Cards/DataByYearAndAgeGroupCard/utils.js

View workflow job for this annotation

GitHub Actions / test

Unable to resolve path to module '../../data/fake-data'

Check failure on line 5 in src/pages/Analytics/Cards/DataByYearAndAgeGroupCard/utils.js

View workflow job for this annotation

GitHub Actions / test

Missing file extension for "../../data/fake-data"

export function renderChart(point, chartType) {
Highcharts.chart('hc-tooltip-with-chart', {
Expand Down
24 changes: 1 addition & 23 deletions src/pages/Analytics/Cards/RichInfoClick/chart-options.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* eslint-disable no-plusplus */
/** @import * as Types from "../../types" */

import sloMunicipalitiesJSON from 'assets/data/slovenia_municipalities.json';
import { sloOBMap } from 'assets/maps/OB.geo.json';
import { fakeData } from 'pages/Analytics/data/fake-data';

Check failure on line 5 in src/pages/Analytics/Cards/RichInfoClick/chart-options.js

View workflow job for this annotation

GitHub Actions / test

Unable to resolve path to module 'pages/Analytics/data/fake-data'

import { dimensions } from '../../highcharts-options/options';

Expand Down Expand Up @@ -53,28 +53,6 @@ const transformData = data => {
}));
};

/**
* Generates fake data for Slovenian municipalities from 2013 to 2023.
* @param {string[]} municipalities - An array of Slovenian municipalities.
* @returns {DataItem[]} An array of objects, each representing data for a municipality in a specific year.
*/
const generateFakeData = municipalities => {
const fakeData = [];
for (let i = 2013; i <= 2023; i++) {
municipalities.forEach(municipality => {
fakeData.push({
name: municipality,
value: Math.floor(Math.random() * 1000) / 100,
// OB_UIME: municipality,
year: i,
});
});
}
return fakeData;
};

const fakeData = generateFakeData(sloMunicipalitiesJSON);

/**
* @type {DataItem[]}
*/
Expand Down

0 comments on commit 9343488

Please sign in to comment.