Extending webix

We have a case where the standard webix charts did not do the job but were are generally happy with the rest of the functionality. So we used the webix.extend calls to create two new charts which borrow heavily from the standard charts just to add the additional capability. One is to add a second y-axis to the scatter chart and the other is to allow variable widths on a stacked bar chart.

The question now is how do we use this with the standard webix library. In debug version this will work fine but once we use the production version of webix.js the calls will fail because of the minified version.

Hello,

Normally we recommend not to use private (starting from _ ) methods and properties for custom components or any other functionality.

You can try minifying “webix_debug.js” with your charts by some minification library, but sure you will have to do it with each new Webix release (if you wish to upgrade).

So if we avoid all usage of the methods and properties that start with “_”, by creating the same behavior in our code, would that be sufficient and not have this problem ?

Yep, there shouldn’t be any issue if you use public API only.

So we used the webix.extend calls to create two new charts

As a side note, new widgets can be created with webix.protoUI, it provides more possibilities that just extending.