Custom chart widget extension - Logarithmic scale
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
Solved! Go to Solution.
- Labels:
-
Coding
-
Extensions
-
Mashup-Widget
-
Troubleshooting
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you Constantine for the reply. But, I achieved the logarithmic scale by Adding the log function here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
If you try to remove the comment in the IDE.JS, the one you added in the line with logarithmic, does it work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
My 2 cents --
- Try to exclude 0 from your domain (log(0) is undefined),
- Reverse the range to [0, 700],
- 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you Constantine for the reply. But, I achieved the logarithmic scale by Adding the log function here.
