Skip to content

Commit

Permalink
Merge pull request #46 from aglowacki/master
Browse files Browse the repository at this point in the history
Added x tick marks every 0.5 kev
  • Loading branch information
Arthur Glowacki authored Apr 28, 2022
2 parents 9b47580 + 720336a commit 9cd00a9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/mvc/SpectraWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,11 @@ void SpectraWidget::createLayout()

_axisX = new QtCharts::QValueAxis();
_axisX->setTitleText("Energy (keV)");
_axisX->setLabelFormat("%1.0f");
//_axisX->setTickCount(series->count());
//_axisX->setRange(0, 2048);
_axisX->setLabelFormat("%.2f");
_axisX->setTickAnchor(0.0);
_axisX->setTickInterval(0.5);
_axisX->setTickType(QtCharts::QValueAxis::TicksDynamic);

_axisX->setTickCount(20);

_top_axis_elements = new QtCharts::QCategoryAxis();
Expand Down

0 comments on commit 9cd00a9

Please sign in to comment.