Splunk Search

Overlapping and truncated axis labels on JS Charts

RohiniJindam
Path Finder

I moved from Flash Charts to JS Charts for PDF generation support.

The X axis (Y axis for bar charts) labels now overlap and the Y axis values are truncated. Flash Charts displayed values as 4E10, 8E10 but JS Charts display them as 25,000,000,000 causing the values to overlap. Using fieldformat to format the numbers as 25B renders blank graphs.

Tried using chart properties like scale, majorTickSize, majorUnit, barSpacing, minorTickVisibility but the issue persists.

Thanks

Tags (2)
0 Karma

jonuwz
Influencer

You could rotate the axis labels, but that would

a) be ugly
b) probably upgrade the module from JSChart to FlashChart

You're only option is to /1024/1024 and change the X axis title to MB

Changing the values to xxGB is going to break the chart.

The chart modules see these values as strings and barf. The chart modules don't know how to scale strings.

RohiniJindam
Path Finder

Thankyou for the answer. I tried using fieldformat to shorten the labels but the graphs ended up blank

0 Karma

nmistry_splunk
Splunk Employee
Splunk Employee

The only viable solution could be -

  1. Shorten the labels: 25,000,000,000 bytes ~ 25Gigabytes (=23.2gb).
  2. Keep 1 chart per row. This will allow for more space for the labels.

What would be an acceptable solution for you?

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...