cancel
Showing results for 
Search instead for 
Did you mean: 

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

BParh.1
Senior III

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?

6 REPLIES 6
Romain DIELEMAN
ST Employee

Hi,

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

/Romain

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

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
Senior III

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 );

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

Hi Romain,

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