Commit 3f8fdd11 by kigrig

Update func.h

parent df5ebf97
Showing with 3 additions and 3 deletions
...@@ -336,14 +336,14 @@ string createChartsOfOneYear(string name, int &pos, string aastadeVahemik){ ...@@ -336,14 +336,14 @@ string createChartsOfOneYear(string name, int &pos, string aastadeVahemik){
} }
toWrite += "]},\n\t\n\t\t{ name: 'Maksimum-5%', data: [ {max-5%}"; toWrite += "]},\n\t\n\t\t{ name: 'Maksimum-5%', data: [ {max-5%}";
replaceInString(toWrite, "{max-5%}", to_string(0.001+(long)maxValue*0.95)); replaceInString(toWrite, "{max-5%}", to_string(0.1+(long)maxValue*0.95));
for(int i = 1; i < rec_count; i++){ for(int i = 1; i < rec_count; i++){
toWrite += ", {max-5%}"; toWrite += ", {max-5%}";
replaceInString(toWrite, "{max-5%}", to_string((long)maxValue*0.95)); replaceInString(toWrite, "{max-5%}", to_string((long)maxValue*0.95));
} }
toWrite += "]},\n\t\n\t\t{ name: 'Maksimum+5%', data: [ {max+5%}"; toWrite += "]},\n\t\n\t\t{ name: 'Maksimum+5%', data: [ {max+5%}";
replaceInString(toWrite, "{max+5%}", to_string(0.001+(long)maxValue*1.05)); replaceInString(toWrite, "{max+5%}", to_string(0.1+(long)maxValue*1.05));
for(int i = 1; i < rec_count; i++){ for(int i = 1; i < rec_count; i++){
toWrite += ", {max+5%}"; toWrite += ", {max+5%}";
replaceInString(toWrite, "{max+5%}", to_string((long)maxValue*1.05)); replaceInString(toWrite, "{max+5%}", to_string((long)maxValue*1.05));
...@@ -508,7 +508,7 @@ string createChartsThroughYears(string name, int &pos, string aastadeVahemik){ ...@@ -508,7 +508,7 @@ string createChartsThroughYears(string name, int &pos, string aastadeVahemik){
toWrite += "]},\n\t\n\t\t{ name: 'Ohtlik punkt üleval', data: ["; toWrite += "]},\n\t\n\t\t{ name: 'Ohtlik punkt üleval', data: [";
toWrite.append(to_string(ule+0.001)); toWrite.append(to_string(ule+0.1));
for(int i = 1; i < rec_count; i++){ for(int i = 1; i < rec_count; i++){
toWrite += ", "; toWrite += ", ";
toWrite.append(to_string(ule)); toWrite.append(to_string(ule));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment