Time range and zone, replace variables, and JS updates in Business Text 3.1.0
We're excited to announce the release of the Business Text panel 3.1.0. This feature release includes the following updates:
- Added Time Zone and Range parameters for JavaScript Code.
- Added Replace variables and Location service parameters for Javascript Code.
- Updated the
replaceVariable
function with a scoped function. Variables in repeated panels are supported. - Updated to the latest Grafana 9.4.3 toolkit.
Time Range and Zone​
Added the Time Zone and Time Range parameters enabling the display of the selected time zone and time ranges with custom handlers.
Here is an example of how to display the selected dashboard, user's time zone, and time range in Grafana.
Content​
<h1>Dashboard {{tz}}</h1>
<h2>Browser {{browser}}</h2>
```json
{{{json (range)}}}
```
JavaScript Code​
handlebars.registerHelper('tz', () => timeZone);
handlebars.registerHelper('range', () => timeRange);
handlebars.registerHelper('browser', () => Intl.DateTimeFormat().resolvedOptions().timeZone);

Replace Variables​
Updated the replaceVariable
function with a scoped function and added support for repeated panels.
Business Text panel provides the {{variable}}
helper to work with dashboard and global variables. Alternatively, you can create a custom Handlebars helper to introduce additional logic and formats.
Content​
- Native helper **{{variable "test"}}**
- Custom helper **{{myVariable "test"}}**
JavaScript Code​
handlebars.registerHelper("myVariable", (name) => replaceVariables(`$${name}`));
Magic (JavaScript) Trio​
One of the three plugins that complete Grafana is Business Text panel. With Dynamic Text, Data Manipulation, and Business Charts panel you can create fully functional web applications meeting your needs and expectations.
Getting Started​
You can install the Business Text panel from the Grafana Plugins catalog or using the Grafana command line tool.
For the latter, please use the following command:
grafana cli plugins install marcusolsson-dynamictext-panel
Tutorial​
The video reviews the major latest release including the data flow, predefined helpers and numerous examples of the external JavaScript libraries.
We have many other tutorials that you can find helpful. You can review all related to this plugin tutorials here.
Release Notes​
Features / Enhancements​
- Added support for the Time Zone and Time Range parameters in JavaScript code (#155).
- Added compatibility with Grafana 9.4.3 (#156).
- Added the Magic (JavaScript) Trio tutorial in the README file (#157).
- Updated the
replaceVariables
function with a scoped function (#160). - Added the Replace variables and Location service parameters for JavaScript code (#160).
We’d Love to Hear From You!​
Your feedback is invaluable to us, and we’re excited to connect with our community and partners. Whether you have a creative idea, or an issue to report, here are the best ways to reach out:
- Enterprise Partners: Need support or have an urgent request? Submit a Zendesk ticket for fast, personalized assistance from our team.
- Community Members: Have a feature suggestion, or bug to report? Start a conversation by creating a GitHub discussions. We’re all ears!
- Join the Conversation: Stay in the loop and share your thoughts! Subscribe to our YouTube Channel and drop a comment—we’re eager to hear your perspective.
Your input drives our improvement, so don’t hesitate to connect with us!