Skip to content

Commit

Permalink
remove barametric readings from daily combined graph
Browse files Browse the repository at this point in the history
  • Loading branch information
William C Bonner committed Jan 21, 2024
1 parent 5c20428 commit ba3bd28
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if (POLICY CMP0141)
endif()

project ("influxdbwindsvg"
VERSION 3.20240121.0
VERSION 3.20240121.1
DESCRIPTION "Retrieves Environment Data from Influx Database and creates SVG files"
HOMEPAGE_URL https://github.com/wcbonner/InfluxDBWindSVG
)
Expand Down
11 changes: 6 additions & 5 deletions influxd-wind-svg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,6 @@ void WriteSVG(std::vector<Influx_Pressure>& TheValues, const std::filesystem::pa
SVGFile << index + GraphLeft << "," << int(((TempMax - TheValues[index].GetOutsidePressure()) * TempVerticalFactor) + GraphTop) << " ";
SVGFile << "\" />" << std::endl;

//TODO: The Next three line position needs to be calculated by an algorythm
SVGFile << "\t<text class=\"barometer-label\" x=\"50%\" y=\"" << int(((TempMax - 974) * TempVerticalFactor) + GraphTop) << "\">Rain</text>" << std::endl;
SVGFile << "\t<text class=\"barometer-label\" x=\"50%\" y=\"" << int(((TempMax - 999) * TempVerticalFactor) + GraphTop) << "\">Change</text>" << std::endl;
SVGFile << "\t<text class=\"barometer-label\" x=\"50%\" y=\"" << int(((TempMax - 1024) * TempVerticalFactor) + GraphTop) << "\">Fair</text>" << std::endl;
Expand Down Expand Up @@ -1157,10 +1156,12 @@ void WriteSVG(std::vector<Influx_Wind>& TheWindValues, std::vector<Influx_Pressu
SVGFile << index + GraphLeft << "," << int(((PressureMax - ThePressureValues[index].GetOutsidePressure()) * PressureVerticalFactor) + GraphTop) << " ";
SVGFile << "\" />" << std::endl;

//TODO: The Next three line position needs to be calculated by an algorythm
SVGFile << "\t<text class=\"barometer-label\" x=\"50%\" y=\"" << int(((PressureMax - 974) * PressureVerticalFactor) + GraphTop) << "\">Rain</text>" << std::endl;
SVGFile << "\t<text class=\"barometer-label\" x=\"50%\" y=\"" << int(((PressureMax - 999) * PressureVerticalFactor) + GraphTop) << "\">Change</text>" << std::endl;
SVGFile << "\t<text class=\"barometer-label\" x=\"50%\" y=\"" << int(((PressureMax - 1024) * PressureVerticalFactor) + GraphTop) << "\">Fair</text>" << std::endl;
if (graph != GraphType::daily) // this text was way too busy on the daily graph
{
SVGFile << "\t<text class=\"barometer-label\" x=\"50%\" y=\"" << int(((PressureMax - 974) * PressureVerticalFactor) + GraphTop) << "\">Rain</text>" << std::endl;
SVGFile << "\t<text class=\"barometer-label\" x=\"50%\" y=\"" << int(((PressureMax - 999) * PressureVerticalFactor) + GraphTop) << "\">Change</text>" << std::endl;
SVGFile << "\t<text class=\"barometer-label\" x=\"50%\" y=\"" << int(((PressureMax - 1024) * PressureVerticalFactor) + GraphTop) << "\">Fair</text>" << std::endl;
}

SVGFile << "</svg>" << std::endl;
SVGFile.close();
Expand Down

0 comments on commit ba3bd28

Please sign in to comment.