Using Custom Elastic Charts Fork in Kibana

Like the title suggests I am trying to use a custom fork of elastic-charts in Kibana so I can do some custom themeing, mostly small things like adjusting font size on bar chart to client request.

I was able to prepare a separate npm package following suggestions from @nickofthyme who was very helpful here

In kibana I tried to point the package.json elastic charts dependency as"@elastic/charts": "./dependencies/elastic-charts-40.1.1.tgz" with the a custom forked elastic charts package which had some console logging to confirm it was my own custom version. I was able to build with yarn kbn bootstrap --no-verify to allow the use of my custom dependency. However when I run with that dependency I'm not seeing any logging like I was seeing in the elastic charts storybook.

I checked the node_modules of Kibana and saw that @elastic/charts is still getting downloaded, despite my pointing the package.json to my .tgz package. I searched for @elastic/charts in Kibana and saw that /packages/kbn-ui-shared-deps-npm/BUILD.bazel, & /packages/kbn-ui-shared-deps-npm/ both reference elastic-charts. I tried removing these references but then yarn kbn bootstrap --no-verify fails.

Is there any way to build kibana with a custom packaged elastic-charts or eui when all I want to be doing is modifying some css theming to my liking?

1 Like

@nickofthyme can you take a look at this when you get the time? Thanks!

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.

Hey @Jacob_Williams,

Sorry for the extremely delayed response, I haven't been getting pings from discuss lately.

It sounds like your issue was resolved per your comment here Nothing getting built to dist folder... · Issue #1654 · elastic/elastic-charts · GitHub.

If not please let us know and we can help troubleshoot, this process can be very finicky :pensive:.