One way might be to show the change in a tooltip. Tooltips can show whatever you like -
- but it does mean creating a new column to show it. There's no reason you cannot show the current premium, percentage change from the previous data point as well percentage change to the next data point.
for (i=0; i < rowsRaw; i++) {
// Create a new row in dataCollege
dataCollege.addRow();
// Save the original data for use later
var Title = dataRaw.getValue(i,0);
var Name = dataRaw.getValue(i,1);
var startYear = dataRaw.getValue(i,2);
var endYear = dataRaw.getValue(i,3);
var photoLoc = dataRaw.getValue(i,4);
// for each new column (there are 5 of them). No need to do column 1 (the bar labels) as they're null anyway
for (j = 0; j < 5; j++){
if (j==0) { dataCollege.setValue(i, j, Title); }
if (j==1) {dataCollege.setValue(i, j, Name); }
if (j==2) { if (photoLoc == null) {dataCollege.setValue(i, j, "<p><b>" + Name + "</b><br>Service: " + startYear + " to " + endYear + " (" + (endYear - startYear) + " years)</p>");}
else {dataCollege.setValue(i, j, "<p><img src='" + photoLoc + "'><b>" + Name + "</b><br>Service: " + startYear + " to " + endYear + " (" + (endYear - startYear) + " years)</p>"); }
}
if (j==3) { dataCollege.setValue(i, j, new Date(startYear, 0, 0)); }
if (j==4) { dataCollege.setValue(i, j, new Date(endYear, 0, 0)); }
}
}
The calculation for the tooltip is done in the line where J==2. Here I show an image (photoLoc) , but not all data points have an image, so it tests for that as well as the calculation.
-----------
Ray