Forum Discussion
Dynamic highlighting of datapoints in graph
Hello,, I came across this x-y scatter graph and was quite fascinated by how it changes visuals based on the slicer selection. By default it's showing all the data points(1st image) but as we change the slicers(2nd & 3rd image) only the relevant data gets highlighted and the rest gets graded out.
Image 2
Image 3
No macros or VBA has been used here. It is created using only formula's and function.
FYI, when I click on the coloured data points(without any slicer selection) it point me in the data range which is fetch using the formula-
=iF( H41=0,
NAO),
INDEX(_01_data[date]
SEQUENCE(H41)))
And upon clicking on the coloured data points(with items selected on slicer) it point me in the data range which is fetch using the formula-
= LET( array,
CHOOSE( (1,2), K11#, L1 1# ),
years,
ROUNDDOWN( K11#, 0),
filteredyears,
FILTER( array,
ISNUMBER( XMATCH( years, G49:G59 ))
hours,
ROUNDUP( INDEX( filteredyears,,2), 0),
filteredhours,
FILTER( filteredyears
ISNUMBER( XMATCH( hours, 149:1721
INDEX( filteredhours,, 1))
Would like to know how to highlight data in such a way as I really found it to be visually appealing. Is it possible only by using such LET or INDEX function.
Will be helpful if someone is aware about it and how can I implement the same for future as well.
1 Reply
- ItsBhattiIron Contributor
Dynamic highlighting of data points in a graph can enhance the visual representation of your data, making it easier for viewers to focus on specific points of interest. Achieving dynamic highlighting typically involves using interactive features available in graphing tools like Microsoft Excel or other data visualization software. Below are general steps you can follow:
Using Microsoft Excel:
Assuming you have a scatter plot or line chart in Excel, you can use a combination of data labels and conditional formatting for dynamic highlighting.
Add Data Labels:
- Right-click on a data point in your chart and select "Add Data Labels." This will display labels with the values for each data point.
Create Highlighting Range:
- In your worksheet, create a new column to serve as a flag for highlighting. For example, if you're highlighting specific data points, mark those rows with a "1" and others with "0".
Conditional Formatting:
- Select the data points on your chart and apply conditional formatting.
- Go to "Home" > "Conditional Formatting" > "New Rule."
- Choose "Format cells that contain" and set the condition to highlight cells with a value of "1."
- Customize the formatting options (e.g., change the fill color or add a border).
Update Data Dynamically:
- As your data changes, update the highlighting column accordingly. The conditional formatting will adjust automatically.
Using Data Visualization Tools:
If you're using dedicated data visualization tools or programming languages like Python with libraries like Matplotlib or Plotly, you can achieve dynamic highlighting with more flexibility.
Interactive Plots:
- Explore the interactive features of your chosen data visualization library. Many libraries provide tools for highlighting points on hover or click.
Tooltip Integration:
- Implement tooltips that display additional information when hovering over a data point. This enhances the user experience by providing context without cluttering the chart.
Add Toggle Buttons:
- Integrate toggle buttons or sliders that allow users to dynamically control which data points are highlighted.
Utilize Selection Events:
- If available, leverage events triggered by user selection. For example, in Plotly, you can use the selectedpoints attribute to identify which points are selected.
Custom Highlighting Logic:
- Implement custom logic for highlighting based on user input or data conditionshttps://lightinfitness.com/
Remember to consult the documentation of the specific tool or library you are using for detailed instructions on interactive features and dynamic highlighting options. The implementation may vary based on the capabilities of the tool you are working with.