cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Yakimo Advocate II
Advocate II

LineChart axis labels

Hello

 

I have a form with a LineChart.

On the X axes there are dates, on Y axes - %

What is the way to format the chart axis labels, like on X to show only dates (not DateTime), and in a format dd-Months-Year?

On Y chart axis labels I would like to format numbers as percent - now they 0.xyz, I would like to show in % format, like XY.Z%

 

Thanks

Yakimo

LineChart.png

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Re: LineChart axis labels

Hi @Yakimo,

Could you please share more details about the formula within the Items proeprty of the Line Chart control?

Further, do you want to format the chart axis labels within the Line Chart control?

If you want to format the chart axis labels within the Line Chart control directly, I afraid that there is no way to achieve your needs in PowerApp currently.10.JPG

The Y axis value is based on the Series value that you specified within your Line Chart control, and it is generated automatically. Currently, we could not format the Y axis value into the format (xy.z%) you want within Line Chart contorl in PowerApps.

The X axis value is based on the Labels value that you specified within your Line Chart control. I suppose that you specify a Date Time column within the Labels property of the Line Chart control, is it true? As an alternative solution, if you want to format the X asix value within the Line Chart control, please take a try with the following workaround:

Set the Items property of the Line Chart control to following formula:

AddColumns(
'20181122_case14',
"FormattedDate",
Text(ProductionDate,"[$-en-US]dd-mm-yyyy")
)

On your side, you should type:

AddColumns(
'YourDataSource',
"FormattedDate",
Text(DateColumn,"[$-en-US]dd-mm-yyyy") /* <-- DateColumn represents the Date Time column within your data source, which you specified within the Labels property*/
)

Set the Labels property of the Line Chart control to FormattedDate column (as below):11.JPG

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Community Support
Community Support

Re: LineChart axis labels

Hi @Yakimo,

Could you please share more details about the formula within the Items proeprty of the Line Chart control?

Further, do you want to format the chart axis labels within the Line Chart control?

If you want to format the chart axis labels within the Line Chart control directly, I afraid that there is no way to achieve your needs in PowerApp currently.10.JPG

The Y axis value is based on the Series value that you specified within your Line Chart control, and it is generated automatically. Currently, we could not format the Y axis value into the format (xy.z%) you want within Line Chart contorl in PowerApps.

The X axis value is based on the Labels value that you specified within your Line Chart control. I suppose that you specify a Date Time column within the Labels property of the Line Chart control, is it true? As an alternative solution, if you want to format the X asix value within the Line Chart control, please take a try with the following workaround:

Set the Items property of the Line Chart control to following formula:

AddColumns(
'20181122_case14',
"FormattedDate",
Text(ProductionDate,"[$-en-US]dd-mm-yyyy")
)

On your side, you should type:

AddColumns(
'YourDataSource',
"FormattedDate",
Text(DateColumn,"[$-en-US]dd-mm-yyyy") /* <-- DateColumn represents the Date Time column within your data source, which you specified within the Labels property*/
)

Set the Labels property of the Line Chart control to FormattedDate column (as below):11.JPG

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Yakimo Advocate II
Advocate II

Re: LineChart axis labels

Thank you, Kris

 

For date X-axis it work great! I can format it as I wish

🙂 Smiley Happy

Is there any way to limit the labels on that X-axis?

I have plotted a data which is every 3 minutes and for 1 day it is quite unreadable.

Any suggestions?

Capture.JPG

Highlighted
mabotula
Frequent Visitor

Re: LineChart axis labels

Hi,

 

I am also facing similar issue, did you find solution for this ? I am not able to limit labels on X-axis. PowerApps is not limiting X-axis values and trying to project all values on X-axis.  Is there a way to display X-axis values properly visible apart from Power BI.

 

benfang
Regular Visitor

Re: LineChart axis labels

In case anyone is still looking for the answer, I used an If function within the AddColumns with the final two columns as 

"date",If(Text(price_datetime,"[$-en-US]dd")="01",Text(price_datetime,"[$-en-US]ddmmm"),"")

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (6,900)