There are two ways I see you can do this depending on what kind of results you want. If you want to plot each and every data point over time, it's as simple as adding this at the end of the search:
| table _time ratio
Because a line chart (or area, or similar) works by taking the first column of its input as the X axis value and the rest of the columns to be the value that should be plotted on the Y axis, it doesn't matter if these columns were generated by a chart command or not.
One problem you will run into is that if you do this over a result set that includes many data points, your graph will take a long time to load or even drop data past a certain point - iirc the new JSChart module takes more datapoints than the FlashChart module that was previously used by default, but there's still a limit and there will still be performance issues even before you approach that limit. Because of this, timechart automatically divides the input into buckets of time and will output only one value per bucket. By default timechart will create a maximum of 100 buckets, which means that if you search the past 5 hours, each bucket will be 3 minutes long (300 minutes divided by 100 buckets = 3 minutes per bucket).
Now, because timechart divides the events into buckets based on time, several events might end up in the same bucket, and timechart somehow needs to find a way of still representing only one value out of that. This is why you can't just simply do timechart ratio - you need to specify a statistical function that tells timechart what to do with its input. You could do timechart first(ratio) as ratio which unsurprisingly grabs the first value in each span and outputs that. You could use last , or avg to take an average, or max , or, or...
tl;dr: For the timechart option, do something like
sourcetype=production eventtype="completedTransaction" tag=pilot | stats count as transactions| join [search sourcetype=production eventtype="totalErrors" tag=pilot | transaction host maxspan=3m | stats count as errors] | eval ratio=(errors/transactions)*100 | fieldformat ratio=tostring(round(ratio,1))+"%" | timechart first(ratio) as ratio
... View more