Fix bestFit line color
This commit is contained in:
+7
-5
@@ -216,6 +216,13 @@ void ChartGraph::plot(const QVariant &graph)
|
|||||||
_chart->addSeries(series);
|
_chart->addSeries(series);
|
||||||
series->attachAxis(xaxis);
|
series->attachAxis(xaxis);
|
||||||
series->attachAxis(y2 ? y2axis : yaxis);
|
series->attachAxis(y2 ? y2axis : yaxis);
|
||||||
|
|
||||||
|
if(serie.contains("color"))
|
||||||
|
{
|
||||||
|
QString color = serie["color"].toString();
|
||||||
|
if(QColor::isValidColorName(color))series->setColor(QColor::fromString(color));
|
||||||
|
}
|
||||||
|
|
||||||
if(serie["bestFit"].toBool())
|
if(serie["bestFit"].toBool())
|
||||||
{
|
{
|
||||||
series->setBestFitLineVisible(true);
|
series->setBestFitLineVisible(true);
|
||||||
@@ -228,11 +235,6 @@ void ChartGraph::plot(const QVariant &graph)
|
|||||||
if(type == "linePoints")
|
if(type == "linePoints")
|
||||||
series->setPointsVisible(true);
|
series->setPointsVisible(true);
|
||||||
|
|
||||||
if(serie.contains("color"))
|
|
||||||
{
|
|
||||||
QString color = serie["color"].toString();
|
|
||||||
if(QColor::isValidColorName(color))series->setColor(QColor::fromString(color));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if(type == "bar")
|
else if(type == "bar")
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user