Forum Discussion

Krunalbpatel's avatar
Krunalbpatel
Helper III
9 years ago

Create new custom visuals from the scratch code

Hi,

 

I want to create custom Power BI visuals for the report. I follow the different links to create custom visuals. But did't get the code for that. I need to know how to write a code in the visuals.ts file. Can you please provide me some basic Idea, How can I write the code? Or Is there any document fot it How to write a code?

 

I have some inbuilt code but I am getting the following error

 

Argument of type '{ value: string | number | boolean | Date; identity: string; }' is not assignable to parameter of type 'CategoryViewModel'.
  Types of property 'value' are incompatible.
    Type 'string | number | boolean | Date' is not assignable to type 'string'.
      Type 'number' is not assignable to type 'string'.

 

 

Thanks

10 Replies

    • Krunalbpatel's avatar
      Krunalbpatel
      Helper III

      Hi BhaveshPatel,

       

      I see this post, But how can I write a code? Is there any documentation for how to code? I am using the code but it gives me an error.

       

      Argument of type '{ value: string | number | boolean | Date; identity: string; }' is not assignable to parameter of type 'CategoryViewModel'.
        Types of property 'value' are incompatible.
          Type 'string | number | boolean | Date' is not assignable to type 'string'.
            Type 'number' is not assignable to type 'string'