The scrollable bar chart is a similar visualization to a usual bar chart, excepts it adds a scroll bar if more bars needs to be shown instead of decreasing the bars size and labels of the bar are always visible, readable and without ellipsis.
Data Requirements
Every mod handles missing, corrupted and/or inconsistent data in different ways. It is advised to always review how the data is visualized.
To make the scrollable bar chart work properly, the underlying data must be formatted in a certain way. A data table with at least two columns is required. At least one column should contain categories and a second column should contain the values for each categories.
Setting Up the Mod
To make the scrollable bar chart work properly, the underlying data must be formatted in a certain way. A data table with at least two columns is required. At least one column should contain categories and a second column should contain the values for each categories.
Region | State | Sales |
---|---|---|
MW | Arizona | 585 |
MW | California | 26 |
MW | Colorado | 387 |
MW | Idaho | 230 |
MW | Illinois | 2100 |
MW | Indiana | 441 |
MW | Iowa | 223 |
MW | Kansas | 456 |
MW | Kentucky | 341 |
MW | Michigan | 1896 |
MW | Minnesota | 743 |
MW | Missouri | 34 |
MW | Montana | 89 |
MW | Nebraska | 558 |
MW | Nevada | 311 |
MW | New Mexico | 240 |
MW | North Dakota | 101 |
MW | Ohio | 1799 |
MW | South Dakota | 59 |
MW | Texas | 57 |
MW | Utah | 251 |
MW | West Virginia | 90 |
MW | Wisconsin | 804 |
MW | Wyoming | 108 |
NE | Connecticut | 489 |
NE | Delaware | 21 |
NE | Maine | 51 |
NE | Maryland | 660 |
NE | Massachusetts | 1460 |
NE | New Hampshire | 32 |
NE | New Jersey | 1649 |
NE | New York | 3993 |
NE | Pennsylvania | 1738 |
NE | Rhode Island | 127 |
NE | Vermont | 52 |
NE | Virginia | 135 |
NE | West Virginia | 51 |
SE | Alabama | 444 |
SE | Arkansas | 191 |
SE | District of Columbia | 19 |
SE | Florida | 2330 |
SE | Georgia | 453 |
SE | Illinois | 10 |
SE | Kansas | 32 |
SE | Kentucky | 201 |
SE | Louisiana | 767 |
SE | Mississippi | 326 |
SE | North Carolina | 652 |
SE | Oklahoma | 319 |
SE | South Carolina | 421 |
SE | Tennessee | 776 |
SE | Texas | 4684 |
SE | Virginia | 1148 |
SE | West Virginia | 165 |
SE | California | 6979 |
SE | Oregon | 268 |
SE | Washington | 1252 |
In the scrollable bar chart configuration in Spotfire, we would specify the 'State' column from the data table above as category axis and the 'Sales' column as our value axis.
Optionally the 'Region' or 'State' categorical columns could be used to color the bars.
The end result will look something like this:
Configuring the Mod
Once the area chart is configured and has data provided, you can configure it to show also value and percentage next to the category label. Also sorting by value is possible.
Using the Mod
Marking
Clicking on a bar or a color in a bar will mark that data and in all other visualizations that uses the same marking.
Vertical scrolling
If the bar chart is longer than the visualization area a scrollbar will be displayed.
Building the Project
In a terminal window:
- npm install
- npm start
In a new terminal window:
- npm run server
Help and Support
This Mod is not supported by Spotfire® Support.
In the event of issues or to suggest features and enhancements, submit an issue in the Mod's GitHub repository.
For general questions about Mods, please post a question in the Forum for Extensions & Mods to make it visible and routed to the appropriate team(s) to respond.
More Information About Spotfire® Mods
- Spotfire Community Exchange: A safe and trusted place to discover ready-to-use Mods
- Developer Documentation: Introduction and tutorials for Mods developers
- Mods code examples on GitHub: A public repository for example projects
Recommended Comments
There are no comments to display.