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
Solved! Go to Solution.
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.
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):
Best regards,
Kris
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.
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):
Best regards,
Kris
Thank you, Kris
For date X-axis it work great! I can format it as I wish
🙂
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?
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.
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"),"")
There should be a field to control the distance between the graph and the edge of the graph area...