Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
BojanSovticEngIT committed Nov 25, 2024
1 parent 34a3d8c commit 7a39a4d
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,6 @@ const addSeriesFromCategoryValuesMapForGroupedBySeriesData = (model: any, catego

export const setGroupedByCategoriesData = (model: any, data: any, attributeColumns: any[], measureColumns: any[], serieForGroupingName: string) => {
const measureForGrouping = measureColumns.find((measureColumn: any) => measureColumn.column.columnName === serieForGroupingName)
console.log('---------- DATA: ', data)
console.log('---------- attributeColumns: ', attributeColumns)
console.log('---------- measureColumns: ', measureColumns)
console.log('---------- measureForGrouping: ', measureForGrouping)
if (!data || attributeColumns.length < 2 || !measureForGrouping) return
const firstAttributeColumn = attributeColumns[0]
const secondAttributeColumn = attributeColumns[1]
Expand All @@ -168,12 +164,9 @@ export const setGroupedByCategoriesData = (model: any, data: any, attributeColum

const measureSerieElementValueMap = {} as any
createSeriesForGroupedByCategoriesData(model, categoryValueMap, measureSerieElementValueMap)
// createMeasureSerieForGroupedByCategoriesData(model, measureForGrouping, measureSerieElementValueMap)
console.log('------- uniqueCatmeasureSerieElementValueMapegoryValues: ', measureSerieElementValueMap)
}

const setUniqueCategoriesValuesFromCategoryValueMap = (uniqueCategoryValues: string[], categoryValueMap: any) => {
console.log('------- uniqueCategoryValues: ', uniqueCategoryValues)
uniqueCategoryValues.forEach((categoryValue: string) => {
Object.keys(categoryValueMap).forEach((key: string) => {
if (!categoryValueMap[key][categoryValue]) categoryValueMap[key][categoryValue] = null
Expand All @@ -182,7 +175,6 @@ const setUniqueCategoriesValuesFromCategoryValueMap = (uniqueCategoryValues: str
}

const createSeriesForGroupedByCategoriesData = (model: any, categoryValueMap: any, measureSerieElementValueMap: any) => {
console.log('------- categoryValueMap: ', categoryValueMap)
Object.keys(categoryValueMap).forEach((key: string, index: number) => {
const serieElement = { id: index, name: key, data: [] as any[], connectNulls: true }
Object.keys(categoryValueMap[key]).forEach((tempKey: string) => {
Expand Down

0 comments on commit 7a39a4d

Please sign in to comment.