Developed a custom web component with LitElement and incorporated a columnrange chart using highcharts. I wanted to apply border radius exclusively to the top left and top right corners of the bars. To achieve this, I attempted to use the highcharts-border-radius external plugin which offers properties like borderRadiusTopLeft and borderRadiusTopRight. However, I encountered an issue when trying to import this plugin into my component. Upon importing it, an error message indicating that Highcharts is not defined was displayed.
I made various attempts to import the plugin:
import "highcharts-border-radius";
I also tried the following:
const borderRadius = require("highcharts-border-radius");
borderRadius(Highcharts);
However, when utilizing the second method, I received an error stating ReferenceError: require is not defined.
If anyone has any suggestions on how to successfully import this external plugin into a LIT element, your assistance would be greatly appreciated.