Using janalyse-series scala API, it becomes very simple to generate a trend chart, 3 lines are enough in order to download, parse CSV data and then generate the chart.

exec java -jar jaseries.jar -nocompdaemon -usejavacp -savecompiled "$0" "$@"

import fr.janalyse.series.CSV2Series
import fr.janalyse.series.view.Chart

val allSeries = CSV2Series.fromURL("")
val closeSeries = allSeries("Close").rename("Google stock value")
Chart(closeSeries).toJpgFile(new"googleStockTrend.jpg"), 800, 400)
The following chart is created.