Skip to main content
BParh.1
Senior III
June 9, 2021
Question

Why we can't have x axis label on last of x axis?

  • June 9, 2021
  • 6 replies
  • 1190 views

So if we choose dynamic graph widget, and activated 'X-AXIS LABELS', it only label up to last grid -1 instead of till last grid.

I want the user to immediately know the nominal value of max X axis from graph instead of deducing from the last one labelled + scale. Anyway to do this?

This topic has been closed for replies.

6 replies

Romain DIELEMAN
ST Employee
June 10, 2021

Hi,

Could you share a screenshot of your issue to understand how to replicate it ? What version of TouchGFX are you using ?

/Romain

BParh.1
BParh.1Author
Senior III
June 10, 2021

Hi @Romain DIELEMAN​ , thank you for your response, I am using TouchGFX Designer version 4.16.1. I attach the screenshot, e.g. I want '10' display at the end of x axis

0693W00000BabZ9QAJ.png

Romain DIELEMAN
ST Employee
June 10, 2021

Hi,

You should increase the "right" value of the Graph Area "Margin" or "Padding". In my case it displays the label up to the last grid so I guess playing around the settings should fix it.

/Romain

BParh.1
BParh.1Author
Senior III
June 10, 2021

Hi @Romain DIELEMAN​ , thanks but I still can't see it despite increasing both the rigth margin and padding.

The only way for me to see is to 'cheat' by specifying the x range from 0 - dataPointsCount instead of from 0 - dataPointsCount -1.

i.e. dynamicGraph.setGraphRangeX(0, dataPointsCount );

Romain DIELEMAN
ST Employee
June 11, 2021

Well it kind of makes sense to use as "Number of Data points" setting 11 and not 10 since you need to include the "0" datapoint. Or by "0 -datapointsCount" you already implied to include the "0" value + "1/2/3/4/5/6/7/8/9/10" ?

/Romain

BParh.1
BParh.1Author
Senior III
June 17, 2021

Hi Romain,

by 'datapointsCount' I meant to include data point at x = 0. So in this case highest x would be 'datapointsCount - 1'