cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DuncanH
New Member

Controlling "Labels' and the 'Series1'?

I would like to know how to control which variables are assigned for the x  and y axis values in a line graph?

I know the values can be set manually, if you are not happy with the choice Powerapps made.

 

I experimented with filtering the data source for the graph and only providing two columns, even this is not sufficient, because now Powerapps assigns the first column to both the 'Labels' and the 'Series1' !!

 

It is also rather confusing that the variable plotted along the x axis is referred to as 'Labels'.

4 REPLIES 4
RandyHayes
Super User
Super User

@DuncanH 

There aren't really any variables involved in this scenario.  You need to shape your data appropriately in the item property of the chart.

What is your Items property now and what are you trying to achieve from it?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
DuncanH
New Member

Hello Randy,

 

The Items property is a Table with a Filter on it. The filtered table has two columns with numeric values. 

DuncanH
New Member

So the question is, how does PowerApps decide what to assign for the vertical axis and what for the horizontal axis. It is maybe a little bit hard to explain because of the names that are used in PowerApps to refer to particular properties.

 

Lets say the name of the first column is 'property_a' and the second column is named 'property_b'. How does PowerApps decide to make the line graph. In my first attempt the graph showed 'property_a' as function of 'property_a'. I thought that by reshaping the data to just two columns it would automatically pick 'property_a' as the quantity to show along the horizontal axis  ('Labels' it is called in PowerApps) and 'property_b' along the vertical axis 'Series1'

RandyHayes
Super User
Super User

@DuncanH 

It really depends on the datatypes of the columns.  If property_a is text, then it will be the labels.  If property_b is numeric, then it will be the series.

What are the datatypes of the data you have?

 

But also keeping in mind, your data table should represent the exact information you want charted.

So -

    Table({Label: "Label1", Qty:200},  {Label: "Label2", Qty:43}, {Label: "Label3", Qty:87})

Will result in 3 series.  The labels will be Label and the Series of each will be Qty

 

    Table({Label: "Label1", Qty1:200, Qty2:43, Qty3:87})

Will result in 3 series.  The labels will be Label and the Series will be Qty1, Qty2, and Qty3

 

Also to note: 

    Table({Label: "Label1", Qty:100},  {Label: "Label1", Qty:43})

Will result in 2 series, not one!  So your data must be grouped and shaped properly.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,459)