AnsweredAssumed Answered

how to update existing symbols when getDefaultConfig is changed in symbol.js

Question asked by peterdp on May 3, 2020
Latest reply on May 4, 2020 by gkhairallah

just lost a lot of time to find out that once a symbol is on the display, the defaultconfig doesn't seem to get applied anymore, I found out that the default config is really read, it is merged into the symbol config BUT your existing symbol on the display DOES NOT CHANGE ! (added some console.logs bot in my arrow.js and PIVisualization.symbol-catalog.js line 106 to be sure) 

An example ? just change Heigth and Width in getDefaultconfig, you will see that for NEW symbols, the width and heigth are changed, but for existing ones, they stay the same, ... (three times same symbol in the image below, ... ) just altered getDefaultConfig in arrow.js

this is extremely annoying if you change the DataShape to something different, because I changed it to a Gauge, but never found the Indicator in the newData object !! (until I added a new arrow)

I guess this is what everyone runs into when you are taking the course right ?

only once I removed the symbol and added it again, it appeared ...

Am I missing something ? I recycled and restarted the IIS, no difference ... as you can see.

This is not the behaviour I need to be able to replace my activex components with extensions ..

because I will be adding new functionality all the time.


What should I do to refresh the symbol with my new DefaultConfig ?