web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Creating a line chart ...
Power Apps
Unanswered

Creating a line chart in powerapps

(0) ShareShare
ReportReport
Posted on by 411

Hello Community!

 

I wanted to know if it´s possible to accomplish this in powerapps: 

 

This is the chart I want to create:

 

HectorOlivos_0-1693872626366.png

 

This is the actual chart in powerapps: 

HectorOlivos_1-1693872650773.png

 

This is how i fill the items in the chart in powerapps: 

 

ClearCollect(
 colParameters,
 ShowColumns(
 Filter(
 SortByColumns(
 FORD_Characteristics,
 "FechaDetección",
 SortOrder.Ascending
 ),
 FechaDetección >= dte_CurrentDate_3.SelectedDate && 
 FechaDetección <= DatePickerCanvas2_1.Value && 
 cmb_PartNumber.Selected.Value = NoParte && 
 cmb_Parameter.Selected.Value = Estación
 ),
 "FechaDetección","Máximo","Minimo","ValorActual","Objetivo"
 )
)

 

 

Now my question: Is it possible to set the labels to be like the first chart?

E.g: 06:00 am | 07:00 am  | 08:00 am  | 09:00 am | 10:00 am | 11:00 am  | 12:00 pm | 01:00 pm | 02:00  pm  | 03:00 pm and so

 

Because the labels in the powerapp chart look very close together.

 

Thanks.

 

 

Categories:
I have the same question (0)
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @HectorOlivos ,

     

    I'm afraid that is not available , but there is a workaround.

     

    Please try this API:

    https://quickchart.io/

    Add a image control and set it's image property to:

    "https://quickchart.io/chart?v=3&c="&EncodeUrl("{
     type: 'ohlc',
     data: {
     datasets: [
     {
     type: 'line',
     yAxisID: 'y1',
     borderColor: '#f00',
     backgroundColor: '#f00',
     borderWidth: 2,
     pointRadius: 0,
     label: 'SMA',
     data: [
     ['2016-04-01T07:00:00Z', 18.832],
     ['2016-04-01T07:10:00Z', 18.98],
     ['2016-04-01T07:20:00Z', 18.97],
     ['2016-04-01T07:30:00Z', 19.082],
     ['2016-04-01T07:40:00Z', 19.262],
     ['2016-04-01T07:50:00Z', 19.352],
     ['2016-04-01T08:00:00Z', 19.39],
     ['2016-04-01T08:10:00Z', 19.438],
     ['2016-04-01T08:20:00Z', 18.97],
     ['2016-04-01T08:30:00Z', 19.082],
     ['2016-04-01T08:40:00Z', 19.262],
     ['2016-04-01T08:50:00Z', 19.352],
     ].map(([d,y]) => ({x:new Date(d).getTime(),y})),
     },
     ],
     },
     options: {
     scales:{
     x:{
     adapters: {
     date: {
     zone: 'UTC-4'
     }
     },
     time: {
     unit: 'minute',
     stepSize: 10,
     displayFormats: {
     day: 'MMM d',
     month: 'MMM d',
     }
     },
     },
     },
     plugins: {
     legend: {
     display: false,
     },
     title: {
     display: true,
     text: 'ChartName',
     font: {
     size: 20,
     },
     },
     },
     },
    }")

    vbofengmsft_0-1693882318137.png

     

    Best Regards,

    Bof

     

  • HectorOlivos Profile Picture
    411 on at

    hi @v-bofeng-msft

     

    I´ve tried using quickchart like this: 

     

    "https://quickchart.io/chart?v=3&c="&EncodeUrl("{
     type: 'ohlc',
     data: {
     datasets: [
     {
     type: 'line',
     yAxisID: 'y1',
     borderColor: '#f00',
     backgroundColor: '#f00',
     borderWidth: 2,
     pointRadius: 0,
     label: 'SMA',
     data: [
     " & Concat(
     SortByColumns(
     colParameters,
     "FechaDetección",SortOrder.Descending
     ), "'" & NewColumn & "',"
     ) & "
     ].map(([d,y]) => ({x:new Date(d).getTime(),y})),
     },
     ],
     },
     options: {
     scales:{
     x:{
     adapters: {
     date: {
     zone: 'UTC'
     }
     },
     time: {
     unit: 'minute',
     stepSize: 10,
     displayFormats: {
     day: 'MMM d',
     month: 'MMM d',
     }
     },
     },
     },
     plugins: {
     legend: {
     display: false,
     },
     title: {
     display: true,
     text: 'ChartName',
     font: {
     size: 20,
     },
     },
     },
     },
    }")

     

    Since im using a collection I created a new column with the with format it was hard coded 

    ['2016-04-01T07:00:00Z', 18.832],

     

    ClearCollect(
     colParameters,
     AddColumns(
     ShowColumns(
     Filter(
     SortByColumns(
     FORD_Characteristics,
     "FechaDetección",
     SortOrder.Ascending
     ),
     FechaDetección >= dte_CurrentDate_3.SelectedDate && 
     FechaDetección <= DatePickerCanvas2_1.Value && 
     cmb_PartNumber.Selected.Value = NoParte && 
     cmb_Parameter.Selected.Value = Estación
     ),
     "FechaDetección","Máximo","Minimo","ValorActual","Objetivo"
     ), 
     "NewColumn",
     Text(FechaDetección, DateTimeFormat.UTC) & ", " & Text(ValorActual, "[$-en-US]0.000")
     )
    );
    

    This is the collection (It Hast 271 items): 

     

    HectorOlivos_0-1693927219053.png

     

    But it´s displaying nothing: 

     

    HectorOlivos_1-1693927236129.png

     

     

     

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 413

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
timl Profile Picture

timl 315 Super User 2026 Season 1

Last 30 days Overall leaderboard