Rank: Advanced Member
Groups: Registered
Joined: 2/18/2017(UTC) Posts: 46 Location: Edinburgh
Thanks: 23 times Was thanked: 3 time(s) in 3 post(s)
|
Hi - I have a JSON file with some live results https://www.zwiftpower.c...ache/live/5490_8700.jsonI want to show the top 10 and certain columns but I also want to show particular information from selected rows and columns. I made this title I was hoping to use but I hit the stumbling block of how to get the data out i wanted. File Attachment(s): LIVE-POS.xaml (7kb) downloaded 17 time(s).You cannot view/download attachments. Try to login or register.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 3/20/2014(UTC) Posts: 2,721 Location: Bordeaux, France Thanks: 243 times Was thanked: 794 time(s) in 589 post(s)
|
Hi! Quote:I want to show the top 10 You can't do that with this JSON source. It'd require you to convert rows to columns which, I just tried, don't seem to work in vMix However you can use this datasource for displaying information in your titles based on rows selection and picking the good columns. Guillaume
|
1 user thanked DWAM for this useful post.
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 2/18/2017(UTC) Posts: 46 Location: Edinburgh
Thanks: 23 times Was thanked: 3 time(s) in 3 post(s)
|
But I can't do multiple row selection to display multiple rows in the same title?
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 3/20/2014(UTC) Posts: 2,721 Location: Bordeaux, France Thanks: 243 times Was thanked: 794 time(s) in 589 post(s)
|
Nope!
the only way to do a top10 in vMix is to have all 10 information as a single row, like:
ID1, name1, ranking1, ID2, name2, ranking2, ID3, name3, ranking3, etc...
vMix can only work with one row at a time
|
1 user thanked DWAM for this useful post.
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 2/18/2017(UTC) Posts: 46 Location: Edinburgh
Thanks: 23 times Was thanked: 3 time(s) in 3 post(s)
|
Thanks DWAM for the help - we now have it working as the JSON files were written for our use.
Within the title fields do you know how to limit the number of shown characters in the xaml file? e.g. limit the characters from a JSON field to show first 10 only?
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 3/20/2014(UTC) Posts: 2,721 Location: Bordeaux, France Thanks: 243 times Was thanked: 794 time(s) in 589 post(s)
|
Quote:Within the title fields do you know how to limit the number of shown characters in the xaml file? With vMix Title Designer you can simply do this by setting the width of the text area to match your need. Otherwise you need to use Expression Blend to create the XAML file
|
1 user thanked DWAM for this useful post.
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 2/18/2017(UTC) Posts: 46 Location: Edinburgh
Thanks: 23 times Was thanked: 3 time(s) in 3 post(s)
|
I set the text area but it overlfows onto the next line - which seams odd File Attachment(s): LIVE-POS.xaml (13kb) downloaded 2 time(s).You cannot view/download attachments. Try to login or register.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 3/20/2014(UTC) Posts: 2,721 Location: Bordeaux, France Thanks: 243 times Was thanked: 794 time(s) in 589 post(s)
|
Yep sorry my mistake. This is the default behaviour.
I'm afraid you will need to use Blend with a "substring" or a "left" command
If your data source was XML, I think you could do it directly with XPath
|
1 user thanked DWAM for this useful post.
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,227 Location: Belgium Thanks: 293 times Was thanked: 956 time(s) in 791 post(s)
|
or change some of the code
mtl:TextBlockDesign is a vMix asset in the xaml code which allows you to have a colored stroke around the characters
Personally i prefer the standard TextBlock and add TextTrimming="CharacterEllipsis" to it to solve the truncating issue and show text has been shortened
try changing the code : replace mtl:TextBlockDesign with TextBlock and delete Fill="#FFFFFFFF" and add TextTrimming="CharacterEllipsis" in each line and see if that suits you
EDIT: REPLACE Fill with Foreground !
|
2 users thanked doggy for this useful post.
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,227 Location: Belgium Thanks: 293 times Was thanked: 956 time(s) in 791 post(s)
|
PS as far as i saw single long words are ok, problem arises when using multiple words in a textblock
edit: when using vMix TextBlockDesign !
|
1 user thanked doggy for this useful post.
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 2/18/2017(UTC) Posts: 46 Location: Edinburgh
Thanks: 23 times Was thanked: 3 time(s) in 3 post(s)
|
Yeah I can't get it to work with multiple words - Will have to think further.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,227 Location: Belgium Thanks: 293 times Was thanked: 956 time(s) in 791 post(s)
|
JonnyNoblett wrote:Yeah I can't get it to work with multiple words - Will have to think further. What not ?
|
1 user thanked doggy for this useful post.
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 2/18/2017(UTC) Posts: 46 Location: Edinburgh
Thanks: 23 times Was thanked: 3 time(s) in 3 post(s)
|
The truncating of the field doesn't work with multiple words
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,227 Location: Belgium Thanks: 293 times Was thanked: 956 time(s) in 791 post(s)
|
Weird as it did before i posted it by making changes to your code Use TextTrimming a lot myself
|
1 user thanked doggy for this useful post.
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,227 Location: Belgium Thanks: 293 times Was thanked: 956 time(s) in 791 post(s)
|
Code:<UserControl Width="1920" Height="1080" Panel.ZIndex="500" InputMethod.IsInputMethodEnabled="True" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mtl="clr-namespace:vMixTitleLibrary;assembly=vMixTitleLibrary">
<Grid InputMethod.IsInputMethodEnabled="True">
<TextBlock FontStyle="Normal" FontWeight="Bold" FontFamily="Proxima Nova Alt" TextTrimming="CharacterEllipsis" Foreground="White" FontSize="20" Text="Word1 Word2 Word3" Name="NAME1" Width="180" Height="24.3600006103516" Margin="5,355,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Visibility="Visible" InputMethod.IsInputMethodEnabled="True" />
<TextBlock FontStyle="Normal" FontWeight="Bold" FontFamily="Proxima Nova Alt" TextTrimming="WordEllipsis" Foreground="White" FontSize="20" Text="Word1 Word2 Word3" Name="NAME2" Width="180" Height="24.3600006103516" Margin="5,390,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Visibility="Visible" InputMethod.IsInputMethodEnabled="True" />
<TextBlock FontStyle="Normal" FontWeight="Bold" FontFamily="Proxima Nova Alt" Foreground="White" FontSize="20" Text="Word1 Word2 Word3" Name="NAME3" Width="180" Height="24.3600006103516" Margin="5,425,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Visibility="Visible" InputMethod.IsInputMethodEnabled="True" />
</Grid>
</UserControl>
Name1 has TextTrimming="CharacterEllipsis" Name2 has TextTrimming="WordEllipsis" Name3 has no trimming Check the difference
|
1 user thanked doggy for this useful post.
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 2/18/2017(UTC) Posts: 46 Location: Edinburgh
Thanks: 23 times Was thanked: 3 time(s) in 3 post(s)
|
Thanks i will try it - is it maybe because the Text is actually an input from a value from a JSON file?
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,227 Location: Belgium Thanks: 293 times Was thanked: 956 time(s) in 791 post(s)
|
JonnyNoblett wrote:Thanks i will try it - is it maybe because the Text is actually an input from a value from a JSON file? Nope as i just tested the example it with your JSON link You will have a display problem with some of the data in the file though , example name = Lukman 'Ascenders Team'
|
1 user thanked doggy for this useful post.
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 2/18/2017(UTC) Posts: 46 Location: Edinburgh
Thanks: 23 times Was thanked: 3 time(s) in 3 post(s)
|
Thank you so much I have managed to get it working!
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,227 Location: Belgium Thanks: 293 times Was thanked: 956 time(s) in 791 post(s)
|
Glad you did Quote:the JSON files were written for our use. now make sure the JSON file (or any other type) is also created properly to get rid of the unreadable characters ;-) (saved as UTF8 compliant or whatever its called)
|
1 user thanked doggy for this useful post.
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 2/18/2017(UTC) Posts: 46 Location: Edinburgh
Thanks: 23 times Was thanked: 3 time(s) in 3 post(s)
|
Yeah - we have that planned so then it will look nice and tidy.
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The vMix Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close