Quantcast
Channel: Developer topics
Viewing all articles
Browse latest Browse all 17899

How to map presentation properties to columns in a table?

$
0
0

Hi all,
I'm new to all of this, but I'm trying to create a new visual that simply displays a link of which gets it property meta data from a table.

I have a table called Links which has the following columns:

 

PowerBI Links.png

 

I want to present title, link text, link url and target as custom presentation properties in the visual, but have it so title will be a drop down list of all values in title so when the user selects a title it updates link text, link url and target strings with its corresponding values.

I hope that makes sense. A snippet of my code is below as it currently stands.
Any pointers would be most welcome.

Many Thanks.

Keith.

 

export class More implements IVisual {
private dataView: DataView;
public static capabilities: VisualCapabilities = {
// Objects light up the formatting pane
objects: {
general: {
displayName: data.createDisplayNameGetter('Visual_General'),
properties: {
formatString: {
type: { formatting: { formatString: true } },
},
},
},
LinkSettings: {
displayName: 'Link Settings',
properties: {
text: {
displayName: "Text",
description: "Link title",
type: {text : true }
},
url: {
displayName: "Url",
description: "Link Url",
type: {text : true }
},
target: {
displayName: "Target",
description: "Link target: {_blank | _self | _parent | _top}",
type: {text : true }
}
}
}
}
};


Viewing all articles
Browse latest Browse all 17899

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>