New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: initial updates to state timeline documentation #84224
Conversation
for the data format, each state ends when the next state begins or when there is a we very recently added support for a second time field that can be used to indicate state endings, because |
@@ -19,9 +19,41 @@ weight: 100 | |||
|
|||
# State timeline | |||
|
|||
State timelines show discrete state changes over time. Each field or series is rendered as its unique horizontal band. State regions can either be rendered with or without values. This visualization works well with string or boolean states but can also be used with time series. When used with time series, the thresholds are used to turn the numerical values into discrete state regions. | |||
A state timeline panel displays data in a way that shows the state changes over time. When using a state timeline, the data is presented as a series of horizontal bars or bands called state regions. State regions can be rendered with or without values, and the state region’s length indicates a particular state's duration or frequency within a given time range. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the first time i've seen the term "state regions". it may be confusing because this panel also supports region annotations. this is not a request to change the terminology, just a comment. i dont have a better name for them 😅
"horizontal bands" may alternatively be called "lanes"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "state regions" terminology exists in these docs all the way back to when this visualization was introduced in v8.0. I'm thinking since it's been here all this time, it would be more confusing to change it at this point unless we get significant feedback that it's confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The more I stare at the words "horizontal" and "length", the more I wonder if these are the correct words here. If we're talking about something we're measuring from left to right in a two-dimensional context, then that's really a "width" (like the way we'd refer to H and W of an image to control it's size). I've suggested removing the word "horizontal" entirely in my edit below because I don't think it's necessarily adding anything in terms of meaning.
If "length" makes sense to everyone else, I'm not intent on changing it; it just struck me as odd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, it can be either, really. "length in time", and "width in pixels"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great start, @mdcruz! This really helps clarify why you'd want to use a state timeline and what kind of data you need to use one. I'll review this again once you've put the video in so I can just make sure the balance of the page still looks good and to catch any copy edits I missed on this review.
docs/sources/panels-visualizations/visualizations/state-timeline/index.md
Outdated
Show resolved
Hide resolved
@@ -19,9 +19,41 @@ weight: 100 | |||
|
|||
# State timeline | |||
|
|||
State timelines show discrete state changes over time. Each field or series is rendered as its unique horizontal band. State regions can either be rendered with or without values. This visualization works well with string or boolean states but can also be used with time series. When used with time series, the thresholds are used to turn the numerical values into discrete state regions. | |||
A state timeline panel displays data in a way that shows the state changes over time. When using a state timeline, the data is presented as a series of horizontal bars or bands called state regions. State regions can be rendered with or without values, and the state region’s length indicates a particular state's duration or frequency within a given time range. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The more I stare at the words "horizontal" and "length", the more I wonder if these are the correct words here. If we're talking about something we're measuring from left to right in a two-dimensional context, then that's really a "width" (like the way we'd refer to H and W of an image to control it's size). I've suggested removing the word "horizontal" entirely in my edit below because I don't think it's necessarily adding anything in terms of meaning.
If "length" makes sense to everyone else, I'm not intent on changing it; it just struck me as odd.
docs/sources/panels-visualizations/visualizations/state-timeline/index.md
Outdated
Show resolved
Hide resolved
docs/sources/panels-visualizations/visualizations/state-timeline/index.md
Outdated
Show resolved
Hide resolved
docs/sources/panels-visualizations/visualizations/state-timeline/index.md
Outdated
Show resolved
Hide resolved
docs/sources/panels-visualizations/visualizations/state-timeline/index.md
Outdated
Show resolved
Hide resolved
docs/sources/panels-visualizations/visualizations/state-timeline/index.md
Outdated
Show resolved
Hide resolved
docs/sources/panels-visualizations/visualizations/state-timeline/index.md
Outdated
Show resolved
Hide resolved
docs/sources/panels-visualizations/visualizations/state-timeline/index.md
Outdated
Show resolved
Hide resolved
docs/sources/panels-visualizations/visualizations/state-timeline/index.md
Outdated
Show resolved
Hide resolved
Thank you, @leeoniya! I'll add this to the docs :) |
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
docs/sources/panels-visualizations/visualizations/state-timeline/index.md
Outdated
Show resolved
Hide resolved
docs/sources/panels-visualizations/visualizations/state-timeline/index.md
Outdated
Show resolved
Hide resolved
docs/sources/panels-visualizations/visualizations/state-timeline/index.md
Outdated
Show resolved
Hide resolved
docs/sources/panels-visualizations/visualizations/state-timeline/index.md
Outdated
Show resolved
Hide resolved
docs/sources/panels-visualizations/visualizations/state-timeline/index.md
Outdated
Show resolved
Hide resolved
docs/sources/panels-visualizations/visualizations/state-timeline/index.md
Outdated
Show resolved
Hide resolved
docs/sources/panels-visualizations/visualizations/state-timeline/index.md
Outdated
Show resolved
Hide resolved
…ne/index.md Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@imatwawana I've added another state timeline example to show two time columns without null values, to reflect the latest changes that @leeoniya worked on here: #84130
docs/sources/panels-visualizations/visualizations/state-timeline/index.md
Show resolved
Hide resolved
Looks great! |
a55807c
to
b262eba
Compare
1. Click the Grafana menu icon and, in the sidebar, click Dashboards. | ||
|
||
1. On the Dashboards page, click New in top right corner and select New Dashboard in the drop-down or select an existing dashboard. | ||
|
||
1. Click + Add visualization. | ||
|
||
1. Under the visualization type dropdown, change the visualization type from Time series to State timeline. | ||
|
||
1. In the Query tab below the graph, select your data source of choice. For example, if you have the [Grafana TestData data source](https://grafana.com/docs/grafana/latest/datasources/testdata/) configured, select CSV content from the scenario dropdown. | ||
|
||
1. Copy the following CSV data as an example: | ||
|
||
``` | ||
Timestamps,Server A,Server B | ||
2024-02-29 8:00:00,Up,Up | ||
2024-02-29 8:15:00,null,Up | ||
2024-02-29 8:30:00,Down,null | ||
``` | ||
|
||
1. Under Transform data tab, click + Add transformation and click [Convert field type](https://grafana.com/docs/grafana/latest/panels-visualizations/query-transform-data/transform-data/#convert-field-type). | ||
|
||
1. Convert the Timestamps field to be of type time. | ||
|
||
1. Add customization to your state timeline by updating the different [state timeline options](#state-timeline-options). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's chat about this addition. We don't want to be repeating what is a fairly simple process (creating a visualization) over and over in the docs. We have docs that explain how to add visualizations that we can point folks to. Is the focus here the transformation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@imatwawana Can you point me to that doc explaining how to add visualization? I can link that instead. For the transformation, I have covered this as part of the video so we can remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create a dashboard describes how to create a dashboard including adding a visualization and a data source.
docs/sources/panels-visualizations/visualizations/state-timeline/index.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
This PR must be merged before a backport PR will be created. |
2 similar comments
This PR must be merged before a backport PR will be created. |
This PR must be merged before a backport PR will be created. |
* docs: initial updates to state timeline documentation * docs: apply linting * Apply suggestions from code review Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com> * docs: add feedback from PR review * docs: apply linting * Wording and formatting edits * Fixed grammar * Update docs/sources/panels-visualizations/visualizations/state-timeline/index.md Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com> * docs: add two examples for state timeline to show null values and two timestamps * docs: add steps to configuring a state timeline * docs: add state timeline video * docs: add link to creating dashboards * Changed link text and added version interpolation syntax --------- Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com> (cherry picked from commit 2f53906)
* docs: initial updates to state timeline documentation * docs: apply linting * Apply suggestions from code review Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com> * docs: add feedback from PR review * docs: apply linting * Wording and formatting edits * Fixed grammar * Update docs/sources/panels-visualizations/visualizations/state-timeline/index.md Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com> * docs: add two examples for state timeline to show null values and two timestamps * docs: add steps to configuring a state timeline * docs: add state timeline video * docs: add link to creating dashboards * Changed link text and added version interpolation syntax --------- Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com> (cherry picked from commit 2f53906)
* docs: initial updates to state timeline documentation * docs: apply linting * Apply suggestions from code review Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com> * docs: add feedback from PR review * docs: apply linting * Wording and formatting edits * Fixed grammar * Update docs/sources/panels-visualizations/visualizations/state-timeline/index.md Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com> * docs: add two examples for state timeline to show null values and two timestamps * docs: add steps to configuring a state timeline * docs: add state timeline video * docs: add link to creating dashboards * Changed link text and added version interpolation syntax --------- Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com> (cherry picked from commit 2f53906)
docs: initial updates to state timeline documentation (#84224) * docs: initial updates to state timeline documentation * docs: apply linting * Apply suggestions from code review Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com> * docs: add feedback from PR review * docs: apply linting * Wording and formatting edits * Fixed grammar * Update docs/sources/panels-visualizations/visualizations/state-timeline/index.md Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com> * docs: add two examples for state timeline to show null values and two timestamps * docs: add steps to configuring a state timeline * docs: add state timeline video * docs: add link to creating dashboards * Changed link text and added version interpolation syntax --------- Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com> (cherry picked from commit 2f53906) Co-authored-by: Marie Cruz <mdcruz@users.noreply.github.com>
docs: initial updates to state timeline documentation (#84224) * docs: initial updates to state timeline documentation * docs: apply linting * Apply suggestions from code review Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com> * docs: add feedback from PR review * docs: apply linting * Wording and formatting edits * Fixed grammar * Update docs/sources/panels-visualizations/visualizations/state-timeline/index.md Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com> * docs: add two examples for state timeline to show null values and two timestamps * docs: add steps to configuring a state timeline * docs: add state timeline video * docs: add link to creating dashboards * Changed link text and added version interpolation syntax --------- Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com> (cherry picked from commit 2f53906) Co-authored-by: Marie Cruz <mdcruz@users.noreply.github.com>
docs: initial updates to state timeline documentation (#84224) * docs: initial updates to state timeline documentation * docs: apply linting * Apply suggestions from code review Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com> * docs: add feedback from PR review * docs: apply linting * Wording and formatting edits * Fixed grammar * Update docs/sources/panels-visualizations/visualizations/state-timeline/index.md Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com> * docs: add two examples for state timeline to show null values and two timestamps * docs: add steps to configuring a state timeline * docs: add state timeline video * docs: add link to creating dashboards * Changed link text and added version interpolation syntax --------- Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com> (cherry picked from commit 2f53906) Co-authored-by: Marie Cruz <mdcruz@users.noreply.github.com>
What is this feature?
Updates to the state timeline docs to include:
Why do we need this feature?
To explain to our users how to configure a state timeline easily and when to use it.
Who is this feature for?
Grafana OSS and Cloud users
Which issue(s) does this PR fix?:
Fixes #
Special notes for your reviewer:
Please check that: