Skip to main content

Grafana 11, context breaking changes, and importing JS modules in Business Text 5.0.0

Daria Volkova
Creative Director at Volkov Labs, Grafana Champion

We're excited to announce the release of the Business Text panel 5.0.0. This release includes the following updates:

  • Plugin rebranding, the new name is the Business Text panel.
  • Replaced the External Resource->Scripts (external JavaScript) with importing via the code. Breaking change.
  • Non context code parameters are retired. Please update the parameter reference the use the context. Breaking change.
  • Added support of the Grafana Standard Options and Overrides (Units and Decimals).
  • Required Grafana 10 and Grafana 11. Breaking change.
Grafana Catalog

The plugin was updated in the Grafana Plugins catalog on June 6, 2024.

Business Text panel 5.0.0 for Grafana.

Business Text panel

The Business Text panel joins the Business Suite for Grafana and with that gets an elevated name. Now, the same amazing open source plugin is called the Business Text panel.

Please welcome the new name for the same functionality!

The Business Text panel now is called the Business Text panel.
The Business Text panel now is called the Business Text panel.

Downloads

The Business Text plugin took off in May of this year and now the total downloads are close to the soaring 7,000,000!

Soaring 7,000,000 downloads!
Soaring 7,000,000 downloads!

External JavaScript replaced with Import

versions

This is a breaking change. However, note, that you still can use external JavaScript code. Find details below.

Since in Grafana 11, the functionality of external JavaScript resources is deprecated, we removed the External Resource->Scripts parameter. You can import the JavaScript library directly in the code.

Our documentation has many examples of how to use external JavaScript libraries moving forward.

Context migration guide

Starting from this release, ensure to reference the Grafana parameter using the context

PreviouslyStarting from version 5.0.0
datacontext.data
dataFramecontext.dataFrame
eventBuscontext.grafana.eventBus
getLocalecontext.grafana.getLocale
handlebarscontext.handlebars
locationServicecontext.grafana.locationService
panelDatacontext.panelData
replaceVariablescontext.grafana.replaceVariables
timeRangecontext.grafana.timeRange
timezonecontext.grafana.timezone

Standard Options and Overrides

The Grafana Standard Options impact all retrieved data columns, whereas Override allows the application of the same configuration only for a limited set of columns.

Starting from this release, the Business Text panel supports two parameters (Units and Decimals) from both Standard Options and Overrides categories.

Below is an example with various Units configurations.

Formating using Overrides.
Formating using Overrides.

Each of them is configured similarly. An example of one such configuration is below. For simplicity, the data is specified right on the Grafana dashboard using the Business Input data source.

The numbers for configuration have a String type. One override is created for the Value column to format it using the Newtons (N) template.

Formating using Overrides in edit mode.
Formating using Overrides in edit mode.

Content code to copy:

{{!-- Return --}}
{{Text}}: {{Value}}

Grafana 10 and Grafana 11

Breaking changes

Grafana 9 is not supported.

Our plugins always follow the latest Grafana versions and stay compatible with the most recent releases. That means, however, that we have to sunset the support of obsolete releases.

The latest Business Text panel 5.0.0 fully supports Grafana 10 and 11 releases.

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.

The Business Text panel for Grafana. Main features overview in 5.0.0

We have many other tutorials that you can find helpful. You can review all related to this plugin tutorials here.

Release Notes

Breaking changes in 5.0.0
  • Requires Grafana 10 and Grafana 11.
  • Removed external scripts deprecated in Grafana 11. Use import instead.
  • Removed non-context code parameters. Please update parameters to use context.
Breaking changes in 4.4.0
  • Requires Grafana 9.2 and Grafana 10

Code parameters migration guide

  • data -> context.data
  • dataFrame -> context.dataFrame
  • eventBus -> context.grafana.eventBus
  • getLocale -> context.grafana.getLocale
  • handlebars -> context.handlebars
  • locationService -> context.grafana.locationService
  • panelData -> context.panelData
  • replaceVariables -> context.grafana.replaceVariables
  • timeRange -> context.grafana.timeRange
  • timezone -> context.grafana.timezone

Features / Enhancements in 5.0.0

  • Added plugin e2e tests and remove cypress (#301)
  • Updated name to Business Text panel (#304)
  • Prepared for Grafana 11 (#304)
  • Added ES6 Modules Support (#312)
  • Added Units and Decimal in panel options (#311)
  • Updated to Grafana 11.0 and dependencies (#315)

Features / Enhancements in 4.5.0

  • Add Info message if sanitize enabled (#290)
  • Update CSS styles responsive and supporting themes (#281)
  • Update to Grafana 10.4.0 (#291)

Features / Enhancements in 4.4.0

  • Update context parameter (#270)
  • Added theme object, notifySuccess & notifyError (#270)
  • Update dependencies and Actions (#271)
  • Replace custom code parameters with Code Parameters Builder (#285)
  • Update CSS class for the panel instead of a Row (#272)
  • Update Editor auto height from fixed value (#278)
  • Disable unitScale and fieldMinMax standard panel options (#286)

Bug fixes in 4.4.0

  • Fix statusColor for Row (#280)

Always happy to hear from you

  Become a sponsor