cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Draw a line on app

Hello everyone,

 

I need to draw a line base on data I input direct on the screen.

Ex: I have 5 input cell with value number like 3, 5, 7, 1 ,9 

And I want to make a multi-line which reflex the value of input cell.

 

How I can make it happen ?

 

Thank you in advance,

Thien 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

@Thien_Dang 

Do you mean like this?

Snipaste_2020-01-17_11-23-35.png

If so, you can use Line chart control to get this. you need to format the input cell into a table and set it to Items property.

If you want to get a clear line, set the Grid style to None, and delete Chart Title and Serial Label, then it will be a perfect broken line.

Sik

View solution in original post

8 REPLIES 8
Super User
Super User

This example will give you what you're after.

"Test1" & Char(10) & "Test2"

So you would want this:

TextInput1.Text & Char(10) & TextInput2.Text & Char(10) & TextInput3.Text

...etc 

---
If this answered your question, please click "Accept Solution". If this helped, please Thumbs Up.

Hello,

 

Thank you for reply.

 

Would you please more specific, this answer pretty high lever for me 🙂

 

Thanks

Thien

@Thien_Dang 

 

Solution of @EricLott  works and actually is very useful.

 

For it to work, we would only add one more thing:

 

If it is TextInput, make sure Mode is set to Multiline

 

For Label, it should just work anyway.

@Thien_Dang 

Yes, I'll be more specific! So what you're try to do is called concatenation. That basically means you want to put a bunch of text together in sequence. In your example, the "text" you want to put in between each text input value is a line break. Since there's no way to explicitly spell out a line break in quotation marks, I used the Char() function. Char() allows us to pass in an ASCII ID and get the ASCII value of that ID. I used 10 since the ASCII ID for a new line is 10. So, what you're seeing is a text value, the & symbol, which just tells PowerApps you want to append more text, then Char(10) which means line break, then another text value, etc..

You can also use Concatenate("String1",Char(10),"String2",Char(10),"String3") which is the same thing, just different syntax.

Also, @poweractivate is correct that a textinput control would need to be set to "Multiline".

Thank you for you reply,

 

I purpose is to draw the line in diagonal and it look like a chart, not straight line :).

 

I can only insert the chart which use all items in list

 

Regards,

Thien 

Oh! Haha sorry I misunderstood. There is currently no way I know of to draw a line chart in PowerApps. You can, however use PowerBI and then import a PowerBI tile into your app.
Community Support
Community Support

@Thien_Dang 

Do you mean like this?

Snipaste_2020-01-17_11-23-35.png

If so, you can use Line chart control to get this. you need to format the input cell into a table and set it to Items property.

If you want to get a clear line, set the Grid style to None, and delete Chart Title and Serial Label, then it will be a perfect broken line.

Sik

View solution in original post

@v-siky-msft 

Thank you for reply,

 

Yes, I need that.

I put that code to "Item" attribute of line chart  and it work 

 

Thank you very much,

Thien

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (67,623)