Skip to main content

Notifications

Power Apps - Power Apps Pro Dev & ISV
Unanswered

Using collection with colours field in chart itemColorSet

(0) ShareShare
ReportReport
Posted on by 40
Hi All
I got a collection with one field of different colours .
This collection is used to create a Column Chart and I want columns in a chart to have a specific colour depending on a current value.
So I have a collection
   {V:34, c:RGBA(255, 204, 153, 1)} 
   {V:50, c:RGBA(255, 204, 204, 1)} 
   {V:64, c:RGBA(204, 255, 204, 1)} 
And I want chart columns to have those colours is per "c" field in collection 
I know itemColorSet property of the chart takes a table, but I just couldnt figure out how to convert collection into a table.
I tried
    Set(ColTable, Table(Collect.c))
but it gives me table of 10 digits numbers instead of colours :/ 
Any ideas?
Thanks
 
  • Nandit Profile Picture
    Nandit 1,551 on at
    Using collection with colours field in chart itemColorSet
    Hi,

    Following up to check if you were able to solve this issue using my suggestion?

    Kind regards,
    Nandit
  • Suggested answer
    Nandit Profile Picture
    Nandit 1,551 on at
    Using collection with colours field in chart itemColorSet
    Hi 
     
    Are you using the Column Chart to display a singe value / single column in the visual?
    If yes, then you can use the following to achieve that directly in the iconColorSet:
    Switch(
        currentValue,
        34,
        [
            RGBA(
                255,
                204,
                153,
                1
            )
        ],
        51,
        [
            RGBA(
                255,
                204,
                204,
                1
            )
        ],
        64,
        [
            RGBA(
                204,
                255,
                204,
                1
            )
        ]
    )
     
    If you are trying to change color for multiple columns in the column chart using Value, I don't think that's achievable. 
     
    Hope this helps. 
     
    Kind regards, 
    Nandit
     
    If this answers your query, please mark this response as the answer.
    If its helpful, please leave a like. Thanks!
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,495

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,822

Leaderboard