Google Chart Date Drill down repeating same bars

Answered
sudhasmsa asked on November 12, 2021

Hello,
Our team has been using flexmonster for awhile and it does a great job thank you for that.
We are using google chart with flexmonster pivot tables. One thing we are having trouble with is, on drill down chart seem to repeat data causing wrong aggregates. This is a very important thing for us.
I have raised similar ticket a while back https://www.flexmonster.com/question/google-chart-date-drill-down-repeating-same-bars/. Want to make sure are there any developments or is it still the same case?
Could you please let us know?
 
Thank you

1 answer

Public
Vera Didenko Vera Didenko Flexmonster November 16, 2021

Hello,
Thank you for writing to us.
 
Our team suggests two possible solutions:
 

  • Using Flexmonster's built-in column chart:
     
    As mentioned previously, Flexmonster offers built-in drillable pivot charts, including a column chart.
     
  • Adjusting your prepareDataFunction method to handle multi-level hierarchies in Google Charts:
     
    Aside from built-in charts, it is possible to integrate Flexmonster with third-party charting libraries. With this approach, you can get the aggregated data from Flexmonster, process it according to the format that your charting library requires, and pass it to the third-party chart to display the resulting data.
    Please note that in this case, the features that third-party charting libraries offer and the data format that they require lie outside of Flexmonster.

    Our team has created open-source connectors for several charting libraries that process the data for you in the correct format for a head start.
    In addition, you can override the data processing logic with your own by providing your prepareDataFunction method (see Google Charts connector details).

    We have an example showing an idea of how you can create a drillable column chart with Google Charts: https://jsfiddle.net/flexmonster/7yo5Lmn9/.
    However, the example doesn't cover the case when multi-level hierarchies are drilled (for example, "year/quarter/month/day" date types). This seems to be the case in your prepareDataFunction as well.

    A possible solution would be to adjust your prepareDataFunction, so it returns only those rows that contain values of the lowest level of the hierarchy. This way, you can filter out the previous values on drill down so Google Charts won't display them.

 
 
We hope this helps.
 
Kind regards,
Vera

Please login or Register to Submit Answer