for parallel gencharts

This commit is contained in:
olli 2023-11-01 11:48:00 +01:00
parent 62eb075739
commit 8a50defb16

View File

@ -11,8 +11,9 @@ function genchart {
[ -z "${colors}" ] && colors="White,Gold,Silver,Blue,DarkMagenta,DarkViolet,Indigo,MediumBlue,DarkOrchid,MidnightBlue,CornflowerBlue,CadetBlue,DarkCyan,DarkSlateBlue,DeepSkyBlue,DodgerBlue,Teal"
local f_tmp="${f_tmp}/$RANDOM"
local f_tmp_data="${f_tmp}-data"
local f_tmp_headline="${f_tmp}-headline"
local f_tmp_data="${f_tmp}/g_genchart/data"
local f_tmp_headline="${f_tmp}/g_genchart/headline"
local f_tmp_legend="${f_tmp}/g_genchart/legend"
mkdir -p ${f_tmp}/g_genchart
local awkfields=$(echo "${fields}" | sed 's/,/ \",\" \$/g; s/^/\$/')
@ -59,7 +60,7 @@ function genchart {
echo "<p class='legend'><font color='${color}'>${linename} (${linelastvalue})</font></p>"
else
echo "<p class='legend'><font color='${linecolor}'>${linename} (${linelastvalue})</font></p>"
fi >>${f_tmp}/g_genchart/legend
fi >>${f_tmp_legend}
local linenum=1
for line in $(cat ${f_tmp_data})
do
@ -94,7 +95,7 @@ function genchart {
if grep -q ',' ${f_tmp_headline}
then
echo "<td id='noborder'>"
tac ${f_tmp}/g_genchart/legend
tac ${f_tmp_legend}
echo "</td>"
fi