Forum Discussion

moises_martinez's avatar
moises_martinez
Frequent Visitor
10 years ago
Solved

How create property string in power bi custom?

Hi everyone!   I'm developing a new custom visual with power bi and I'm creating new properties, but I don't know how to create string properties.   For color I'm using type: { fill: { solid: { c...
  • itayrom's avatar
    10 years ago

    String properties are defined as follows:

    type: { text: true }

     

    EDITED:

    By the way, you can see how the property type descriptors are defined in the VisualContracts.d.ts file in the custom-visuals github project. More specifically, the ValueTypeDescriptor interface defines the primitive propery types and the StructuralTypeDescriptor interface defines structural types(such as the fill type). You can then look for examples in the project by searching it for values corresponding to the definition. For example, you can see that the definition of the text property type expects a boolean value. Therefore, if you search the project for "text: true", and there happens to be a visual using it, the search will take you there(For property types that expects objects, such as the fill property, you can search for pattens such as "fill: {").