cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Custom chart widget extension - Logarithmic scale

SV_11774161
7-Bedrock

Custom chart widget extension - Logarithmic scale

Hello,
I am trying to Modify the custom chart widget extension for logarithmic scale in Y-Axis in time series chart. After building the code with necessary changes( in ide.js, runtime.js) and importing in Thingworx, I get Logarithmic option in Y-AxisIntervals but chart is not visible in run time. 

Getting the following error :
ERROR [widget] "NavigateFramework_CssFiles" widget type is missing required member widgetProperties()
ERROR [widget] An error occurred while calling undefined::widgetProperties(), Id = "undefined", Mashup = "Test234". [{}]

Can anybody help me to fix this and guide me if I am missing anything?
Attached screenshots of the code modified for logarithmic scale.

ACCEPTED SOLUTION

Accepted Solutions

Thank you Constantine for the reply. But, I achieved the logarithmic scale by Adding the log function here.

SV_11774161_0-1730090528964.png

 

View solution in original post

4 REPLIES 4

If you try to remove the comment in the IDE.JS, the one you added in the line with logarithmic, does it work?

Thankyou VladimirRosu for the reply.

Removing the comment didn't help, Looks like there was an error with d3.scalelog() so the chart was not appearing. After changing it to d3.scale.log() (referring from the library) chart appeared.

 

Sorry for the late response, I  just wanted to make sure I had done some workaround before getting back to you.

But, still didn't get the logarithmic scale as expected. I am trying to the achieve the scale as shown in the attachment (Expected 

.PNG) but the result I get is (Result.PNG). Any help to achieve the expected result?

My 2 cents --

  1. Try to exclude 0 from your domain (log(0) is undefined),
  2. Reverse the range to [0, 700],
  3. I saw some people add .nice() to the scale. I have no idea what it does exactly, but won't hurt to try, i.e. range(...).nice()

/ Constantine

Thank you Constantine for the reply. But, I achieved the logarithmic scale by Adding the log function here.

SV_11774161_0-1730090528964.png

 

Announcements


Top Tags