For fun project with stock tickers.
I have a TimeSeriesChart in perspective I am trying to show prices in. I made a named query that grabs the date and closePrice of the day and a function that provides this data along with a name to the series property but then it comes through as just showing closePrice
which makes it impossible to differentiate
with the series like
The only way I was able to get the actual ticker name on the chart as to make the column name the ticker name when I create the data like
series = [
{
'name':ticker,
'data':system.dataset.toDataSet(['date',ticker],
system.db.runNamedQuery('tickers/getPriceFromYear',{'ticker':ticker,'year':year}))
}
for ticker in tickers]
However this then makings union-ing the datasets in the series not work immediately due to all of them having different column names.
I was able to randomly assign colors by changing plots[0].trends
so I thought that might be where I was able to modify the labels and keep the datasets the same column setup, but I had no luck.
It feels like I am missing something here about how to label the lines - that I should be able to have each series data property have the same dataset structure with a date,closePrice
columns and then only modify how it's shown on the UI in some property - but I can't figure it out. Is this possible, or do I need each dataset to have the ticker name as the column name?