Is there any way to specify that I want vertically oriented labels on a chart? Please see the attached screen shot. The labels at the bottom (x axis) are all jumbled up.

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered
Photo of Ben

Ben

  • 0 Points

Posted 3 years ago

  • 0
  • 1
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,064 Points 20k badge 2x thumb
You have to use script to modify the QuickBase rendered Highchart. I used this script to rotate and offset the xAxis labels of a bar chart counting the number of functions in the Formula Function Reference table ( https://login.quickbase.com/db/6ewwzuuj?a=td)


var chart = Highcharts.charts[0];
var options = chart.options;
chart.destroy();
options.xAxis[0].labels.rotation = -45;
options.xAxis[0].labels.y = 50;
var chart = new Highcharts.Chart(options);

This is a generic script where you can (1) recover the options of a rendered chart, (2) modify the options to patch up the chart and (3) redraw the chart anew. These commands were entered into the JavaScript console directly. You cannot use the IOL technique to automatically apply this script because there is no way to directly drop the image onload field (ie [-]) into the chart page. You can however us the Service Worker technique to perform this automatically. See attached pdf file with before and after screenshots.

Contact me off-world if you would like additional help implementing this feature or if you would like to know more about using Service Workers with QuickBase.


Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=522