[Custom Plugins] Extract chart data of event segmentation to draw the graph

Hi team, I have a custom event similar to Countly Lost event. The example from this link is quite familiar with me https://resources.count.ly/reference#omethodevents. Could we draw the chart for the event's segmentation (in this case is level segments) in the custom plugin?

If the answer is yes.
I use extractChartData function to extract the data's response(event with no segmentation) and It works fine.
But I can't use extractChartData with the data's response (event with segmentation is level). I tried with extractTwoLevelData but the data is not correct (It does not have chartDP field which to draw the chart). Could you give me a sample code to extractChartData for the event segmentation ?

0

Comments

1 comment
  • As far as I see, we don't show segmented data as a timeline anywhere. So for segmented data extractTwoLevelData would be the right approach.

    I think the reason is, because we don't store hourly information for segmented data.
    But if you use period that does not require hourly data, I think it should be ok to also feed this data into extractChartData too, like views did it, long time ago:

    To fetch view data:

    And to feed view data into extract char, although data is segmented (you can use it in extractChartData to extract timeline for specific single )

    Where metric will be c,s, dur, etc for events
    and path would be segment value

    0
    Comment actions Permalink

Please sign in to leave a comment.