# Customize panel time range on visualizations on a dashboard via app state, global state or another way by URL

**URL:** <https://discuss.elastic.co/t/customize-panel-time-range-on-visualizations-on-a-dashboard-via-app-state-global-state-or-another-way-by-url/320740>\
**Category:** Kibana\
**Created:** [December 8, 2022, 5:47am UTC](https://discuss.elastic.co/t/customize-panel-time-range-on-visualizations-on-a-dashboard-via-app-state-global-state-or-another-way-by-url/320740 "2022-12-08T05:47:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DMinovski](https://avatars.discourse-cdn.com/v4/letter/d/5fc32e/32.png) [@DMinovski](https://discuss.elastic.co/u/DMinovski)\
**Post date:** [December 8, 2022, 5:47am UTC](https://discuss.elastic.co/t/customize-panel-time-range-on-visualizations-on-a-dashboard-via-app-state-global-state-or-another-way-by-url/320740/1 "2022-12-08T05:47:20Z")

</div>

I have a dashboard with visualizations. When I click on a visualization's options and select Customize time range, selecting a range updates the key dashboardStateManagerPanels in the browser's Sessions storage, to show the new time range for that visualization (panel).

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/5/4/5425edc317bdcf9627a9113caa21d34ea6427f6f.png)

The `panels` field that has the visualizations is below the `filters` field, which can use the `appState` to store parameters that can be sent from the URL as query parameters in Rison format.  
Can the `timeRange` for the individual visualizations be set dynamically from the URL as well, the same way that the filters are set in a non persistent way? If I transform the JSON of the panels from dashboardStateManagerPanels to Rison, and send it in `&_a=`, I get a dashboard without visualizations with the message This dashboard is empty. Let’s fill it up!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 5, 2023, 4:47am UTC](https://discuss.elastic.co/t/customize-panel-time-range-on-visualizations-on-a-dashboard-via-app-state-global-state-or-another-way-by-url/320740/2 "2023-01-05T04:47:56Z")

</div>



---

<div class="post-metadata">

**Author:** ![DMinovski](https://avatars.discourse-cdn.com/v4/letter/d/5fc32e/32.png) [@DMinovski](https://discuss.elastic.co/u/DMinovski)\
**Post date:** [January 6, 2023, 1:34pm UTC](https://discuss.elastic.co/t/customize-panel-time-range-on-visualizations-on-a-dashboard-via-app-state-global-state-or-another-way-by-url/320740/3 "2023-01-06T13:34:05Z")

</div>

If I set an individual custom time range on visualization, and then share a **Snapshot** instead of **Saved object** link, the visualization ID with its time range is visible in the URL. Every visualization is in the panels parameter, and it has its own `embeddableConfig`:

`(embeddableConfig:(enhancements:(),timeRange:(from:now-1y,to:now)),gridData:(h:15,i:e0430401-6289-49d4-8857-3582fea44cde,w:24,x:0,y:0),id:e6204d90-87d8-11ed-ad56-afaefd1d01cf,panelIndex:e0430401-6289-49d4-8857-3582fea44cde,type:visualization,version:'7.15.2')`

The custom time range is in `timeRange:(from:now-1y,to:now)`. The URL can be generated dynamically, with custom time ranges for specific visualizations.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 3, 2023, 1:34pm UTC](https://discuss.elastic.co/t/customize-panel-time-range-on-visualizations-on-a-dashboard-via-app-state-global-state-or-another-way-by-url/320740/4 "2023-02-03T13:34:15Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
