Need a special offer?Find out if your project fits.
+

ShowEmptValues as field property

Answered
Ilaria asked on May 8, 2023

Hi,
I have a customer requirement on the ShowEmptyValue option: they would like to specify the ShowEmptyValue at field level (now it is possible only specify at rows or column level). It seems a reasonable requirement. For example suppose to have Continent/Country/Month as rows hierarchy. If I want to see all the months, even the empty one, I should set the ShowEmptyValue property to 'columns' but that way, all the combination of Continent/Country are rendered, so for example I see Italy also under 'America' or 'Asia'... 
Is it possible to implement this feature?
Thank you in advance.
Ilaria
 

13 answers

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster May 8, 2023

Hello, Ilaria!
 
Thank you for contacting us.
 
We kindly recommend configuring a Continent/Country hierarchy to avoid duplicated columns. This can be done using mapping as follows:

 dataSource: {
      filename(api): //JSON, CSV, Flexmonster Data Server, MongoDB, or custom data source API data
      mapping: {
        "Continent": {
          hierarchy: "Geography",
        },
        "Country": {
          hierarchy: "Geography",
          parent: "Continent"
        }
      }
    },

Here is a JSFiddle example for visualization: https://jsfiddle.net/flexmonster/2pdgfjzb/.
 
You can read more about configuring the multilevel hierarchies in our docs: https://www.flexmonster.com/doc/mapping/#multilevel-hierarchies.
 
Hope you will find our answer helpful.
Please let us know if the suggested approach works well for you.
 
Best regards,
Solomiia

Public
Ilaria May 9, 2023

Thank you for the quick reply.
We did take in consideration using hierarchical fields but there are some cases in which it is not possible.
In the example I mentioned before, suppose you have another aggregation for country, say the 'Climate type' (hot, warm, cool, cold)... You can't put in the hierarchy both continent and type; for example Asia may be considered both hot and cold.... So in this case you have to consider the 'Climate Type' as an independent field but still, if you enable the show empty value option, you will see the combination 'Cold' under 'Oceania' which sounds strange.
Our real case is more complex, we deal wirh sales data where products might have dozen of attributes for aggregation, independent of each other, so the hierarchical filed is not an option.
Thank you,
Ilaria

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster May 9, 2023

Hello, Ilaria!
 
Thank you for the detailed explanation of your use case.
 
After some discussion, we have decided to implement the requested feature and add the showEmptyValues as a field property. The feature would be included in our minor release on the ETA June 12th.
 
Our team will notify you about any updates on the matter.
 
Feel free to contact us in case of any other questions.
 
Kind regards,
Solomiia

Public
Ilaria May 9, 2023

Hi Solomiia!
Thank you for considering my request!
Ilaria

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster May 9, 2023

Hello, Ilaria!

You are welcome. We are happy to have the opportunity to improve our product.

As said, our team will notify you about any updates on the feature.

Do not hesitate to contact us if any other questions arise.

Regards,
Solomiia

Public
Ilaria May 10, 2023

Hi,
it has come to my mind right now that you should consider also hierarchical fields: in our real case we want to enable this option to a 'date field' composed by the hierarchy year/month/date. We would like to see all dates foreach item (even if they have no data), but obviously we woldn't like to see for example 01 Jan 2023 under all the month/years.
Thank you!

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster May 11, 2023

Hello, Ilaria!
 
Thank you for getting back to us.
 
We want to ask you for a JSFiddle sample to ensure we understand your request correctly. It would greatly help our team if the sample contained the data organized similarly to the case you described. Additionally, it would be very helpful to have an example of the desired data visualization.
 
Kindly note that regardless of the other factors, the feature will let you show only the months present in the data source. If some months are not present in the data source, we suggest preprocessing the data and adding them manually.
 
Looking forward to hearing your response.
 
Kind regards,
Solomiia

Public
Ilaria May 12, 2023

Hi Solomiia,
sure, I prepared 3 JSFiddle:

  • ShowEmptyValues - disabled: if you expand the last level (Month) I see only the month with value, but I would like to see all months
  • ShowEmptyValues - enabled: now i see all months but, i see also the value 'Cold' under 'Oceania' and this is wrong
  • ShowEmptyValues - desired: I see all the months but all other aggregations are unchanged, so under 'Oceania' i see only 'Hot', which is right. Note that i had to add manually all wanted combination by manually adding records 0 to the dataset, which is something we can't do in prduction since this increases a lot the dimension of the data set for very sparse data.

The request is: have the chance to define ShowEmptyValue only for the field 'Month' , obviously mantaing the 'Date' hierarchy, so that under 2023 I see only month belonging to 2023.
Also, it is ok if the pivot will process only the month present in the data source. I mean, in the sample I dont'expect that month July is added in the pivot, since there are no records associated to that month.
If you need some more detailed examples let me know.
Thank you,
Ilaria
 

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster May 12, 2023

Hello, Ilaria!
 
Thank you for such a detailed explanation.
 
We have shared all the provided information with our Development team. In case they need any further details, we'll be sure to reach out to you.
 
We will notify you when the fix is ready.
 
Kind regards,
Solomiia

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster June 13, 2023

Hello, Ilaria!
 
Hope you are doing well.
 
We are happy to inform you that the showEmptyValues property is now available in the mapping. This property is now used to show members with empty values for specific fields.
 
We have prepared a JSFiddle sample for illustration: https://jsfiddle.net/flexmonster/gbd9jsnw/. Please don't forget to clear the cache before testing.
 

This feature is included in the 2.9.53 version of Flexmonster: https://www.flexmonster.com/release-notes/version-2-9-53/.
You are welcome to update the component: https://www.flexmonster.com/doc/updating-to-the-latest-version/.
 
Please let us know if the new property works well for your case.
 
Kind regards,
Solomiia

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster June 20, 2023

Hello, Ilaria!

Hope you are having a great week.

Our team is wondering if you had a chance to test the new showEmptyValues property. Could you please let us know if it works well for you?

Looking forward to hearing your feedback.

Kind regards,
Solomiia

Public
Ilaria June 21, 2023

Yes, thanks.
That's exactly what I need!
Best regards,
Ilaria

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster June 21, 2023

Hello, Ilaria!

Thank you for your feedback.

Our team is glad to hear the new property satisfies your needs.

Feel free to contact us in case of any other questions.

Best regards,
Solomiia

Please login or Register to Submit Answer