cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
hngdev
Resolver II
Resolver II

Chart For Complex Data

Hello everyone,

 

Screen Shot 2016-05-19 at 7.03.45 PM.png

I am trying to create a line chart with complex data as shown.

What is the best way to implement it?

Using collect is not a good idea for this because the chart requires 4 series with 24 points.

for example:

collect(sample, {unit:"unit 1", h1:1, ..., h24:9})

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
hpkeong
Community Champion
Community Champion

Hi

 

My suggestion:

1. Add your Excel Table into Apps, say Table1

2. Add a text gallery, and insert related TextBox to show data

- Legend

- Field 1, Field 2, Field 3, Field 4

3. Add a LineChart

4. Click onto Chart (Center Portion), under the Left Pane Control Properties,set:

items = Table1

Number of Series = change to 4 (in your case 4 fields).

 

Then, if you keep adding data into Excel from Apps, Gallary data will be added and LineChart will automatically be appended with latest data.

 

Hope this helps.

 

 

 

 

hpkeong

View solution in original post

Thank you for the idea.

I am not familiar with charts at this point and think that only collection can work with charts.

I use GroupBy and Filter funtion to help me out.

The image shown is just the sample of what I want to get. The actual thing is to get and filter data from our Sharepoint, then apply the data on the chart.

Anyways, your idea showed me the path.

Thank you. 

View solution in original post

7 REPLIES 7
hpkeong
Community Champion
Community Champion

Hi

 

My suggestion:

1. Add your Excel Table into Apps, say Table1

2. Add a text gallery, and insert related TextBox to show data

- Legend

- Field 1, Field 2, Field 3, Field 4

3. Add a LineChart

4. Click onto Chart (Center Portion), under the Left Pane Control Properties,set:

items = Table1

Number of Series = change to 4 (in your case 4 fields).

 

Then, if you keep adding data into Excel from Apps, Gallary data will be added and LineChart will automatically be appended with latest data.

 

Hope this helps.

 

 

 

 

hpkeong

Thank you for the idea.

I am not familiar with charts at this point and think that only collection can work with charts.

I use GroupBy and Filter funtion to help me out.

The image shown is just the sample of what I want to get. The actual thing is to get and filter data from our Sharepoint, then apply the data on the chart.

Anyways, your idea showed me the path.

Thank you. 

hpkeong
Community Champion
Community Champion

Hi

 

You are most welcome. (My typo mistake: Legend, not ledeng...too fast as I was in the seminar when replying....sorry)

In fact, GroupBy is used with Collection. I tried before for complex data and Chart doesnt work, but it can be accomlished using TextBox with Color.Fill to show percentage. This is done with trick.

If you wish to create with GroupBy with some complicated data, do view one of my sharing under hpkeong. Otherwise, just post here and I can share on how to accomplish.

 

Gallery is good to show all the data and then you can work it out from here for:

- Graph

- Summation

- Filtering.

 

I propose you to read the Tutorials in the website..Learn. It is good for you.

I had read all of them and use slowly.

hpkeong

Hello,

I don't understand the way you approach.

As I am able to get desired datasource to apply to Items property of the line chart by using Group, why would I need to use Gallery (which can be treated as datasource)?

Also, the way you use TextBox and Color.Fill, it looks more like building a column chart if I am correct.

Thank you.

hpkeong
Community Champion
Community Champion

Hi

 

You may omit Gallery.

Gallery is jsut use to show the data in your Collection. I used Gallery just to show data from Collection insteaad clicking Collection to View. Whn in App Mode, you can't view Collection. You need to use, such as Gallery to show data, if you wish.

 

My experience: when you use GroupBy, you can;t really show in Chart. Chart is used to show original data, BUT not Calculated / Manipulated Data. So, I have to use alternative method.

Maybe I am wrong but I had tried it out and looking for support from PG, but no one reply on the possibility on making chart out of Groupby.

 

I will try more and share or if you have raw data with GroupBy, I may check for you.

 

hpkeong

Hello,

I hope you can try again.

What I used GroupBy on all the fields I wanted to be on the chart.

For example:

GroupBy(Filter(DataSource, FieldToFilter = lstFromDataSource.Selected.FieldToFilter), "FieldForLabel", "Field1", "Field2", "JustAGroupName")

This works for me.

hpkeong
Community Champion
Community Champion

Hi

 

Well, thanks for sharing. Maybe I express wrongly.

I can create chart but not Sorting and something else.

Anyway, I will check yours . TQ

hpkeong

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,562)