mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-28 08:48:48 +02:00
fix grid
This commit is contained in:
parent
62790e9aad
commit
95d2fbc9b7
@ -466,7 +466,7 @@ LineChart::LineChart(Rect position, std::string title, TData data, TIcons icons,
|
|||||||
int dayGridInterval = maxDay < 700 ? 7 : 28;
|
int dayGridInterval = maxDay < 700 ? 7 : 28;
|
||||||
for(const auto & line : data)
|
for(const auto & line : data)
|
||||||
{
|
{
|
||||||
for(int i = 0; i + dayGridInterval - 1 < line.second.size(); i += dayGridInterval)
|
for(int i = 0; i < line.second.size(); i += dayGridInterval)
|
||||||
{
|
{
|
||||||
Point p = getPoint(i, line.second) + chartArea.topLeft();
|
Point p = getPoint(i, line.second) + chartArea.topLeft();
|
||||||
canvas->addLine(Point(p.x, chartArea.topLeft().y), Point(p.x, chartArea.topLeft().y + chartArea.h), ColorRGBA(70, 70, 70));
|
canvas->addLine(Point(p.x, chartArea.topLeft().y), Point(p.x, chartArea.topLeft().y + chartArea.h), ColorRGBA(70, 70, 70));
|
||||||
|
Loading…
Reference in New Issue
Block a user