AnsweredAssumed Answered

FileMaker Google chart Sort

Question asked by uniquesoft on Nov 14, 2018
Latest reply on Nov 16, 2018 by mikebeargie

Hello, I used google chart to generate a vertical line chart. Is there a way to sort the y series to descending order?

As of now the time was sorted in ascending but my client want to see it in descending order.

 

here is a sample script for the data:

 

 

function drawChartDepth() {

var data = new google.visualization.DataTable();

data.addColumn('timeofday', 'TIME');

data.addColumn('number', 'Depth [M]');

 

 

data.addRows([

" & Main__ProjectDataShow::chartDepthList & "

]);

 

 

var options = {

title: '',

legend: { position: 'none' },

orientation: 'vertical',

fontSize: 8,

hAxis: {

title: 'Depth',

viewWindow: {min: 0, max: " & Abs ( Main__Settings::chartMaxDepth ) & "},

gridlines: { count: 6 },

},

vAxis: {

title: 'Time',

fontSize: 8,

}

};

 

 

var chart = new google.visualization.LineChart(document.getElementById('depth'));

chart.draw(data, options);

}

Filemaker GChart.png

 

Filemaker GChart2.png

Outcomes