cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Sparkline column in Custom App doesnot show the X/Yaxis data

AjithaN
Visitor

I have developed a Custom App to have the visualization of all Davis problems . It has a datatable with Event Category,Priority and a sparkline column to display the count of problems over a period of time ( as a timeseries data). Although the sparkline comes as expected, I could not find a way to show the date/time in the X axis which will make it more meaningful..From the sparkline column view, its not possible to understand where and at what time/date the spike happened. Could anyone help here. Below is the Datatable configuration I have as of now.

 

<DataTable data={filteredRecords || []} columns={[
        { header: 'Management Zone'accessor: 'management_zone'id: 'management_zone',autoWidth:true},
        { header: 'Event Category'accessor: 'EventCategory'id: 'EventCategory',autoWidth:true },
        { header: 'Priority'accessor: 'Priority'id: 'Priority'},
      // {header:  'count', accessor: 'count', id: 'count'},
       {header: 'count graph',id:'countData',columnType:'sparkline'accessor: (row=> 
    
        (result.data ? convertToTimeseries([row], result.data.types) : []),
      
        config: { color: Colors.Charts.Rainbow.Magenta.Default}, ratioWidth: 1,
        
      }
      
           ]} >
4 REPLIES 4

AjithaN
Visitor

Can somebody reply to this post pls

haris
Dynatrace Advisor
Dynatrace Advisor

Hi AjithaN,
considering that Sparkline is a compact and simple visualization that consists of a single line or area graph, without axes or labels, that represents the variation of data points over time, I would say it's not most suitable for your use case.

 

I would use a combination of sparkline, so you can monitor the trend, and timeseries for a more detailed overview of the period, so you can view specific details of the spike. I'm referring to this timeseries chart: https://developer.dynatrace.com/design/components-preview/charts/TimeseriesChart/

Have you already considered using timeseries here?

AjithaN
Visitor

Thanks much for the response. I tried using an intend next to the sparkline so that it can be redirected to a notebook for a detailed view of the sparkline trend , but seems the data loaded doesn't match because the timeframe selected and filter selected doesn't seem to get saved while fetching the data again. Is there any chance I can display the same sparkline with details (axis,spike points etc) on the same screen without using intends. Something like when we click on the present sparkline in the datatable, it pops up and shows detailed graph. Your response would be greatly helpful for me at this stage.

dani_coll
Dynatrace Promoter
Dynatrace Promoter

Hi AjithaN,
Currently the Sparkline inside a DataTable Cell does not support the showTicks option that allows you to see the X axis. You can achieve that by using the Sparkline visualization directly in your custom app.

One solution could be using DataTable.CellActions to display your independent and detailed Sparkline when the user clicks on the Sparkline cell

Another solution is the one you commented with an intent that allows you to open the Sparkline directly on Notebooks. You can pop up that intent as well with DataTable.CellActions .
The problem you had with the timeframe can be solved by providing the current timeframe configuration of your custom app in the intent so Notebooks knows what timeframe needs to render

{
  "dt.timeframe": {
    "from": "now()-7d",
    "to": "now()"
  },
}




Featured Posts