# Using Custom Elastic Charts Fork in Kibana

**URL:** <https://discuss.elastic.co/t/using-custom-elastic-charts-fork-in-kibana/302780>\
**Category:** Kibana\
**Created:** [April 20, 2022, 8:43am UTC](https://discuss.elastic.co/t/using-custom-elastic-charts-fork-in-kibana/302780 "2022-04-20T08:43:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jacob\_Williams](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jacob_williams/32/104568_2.png) [@Jacob\_Williams](https://discuss.elastic.co/u/Jacob_Williams)\
**Post date:** [April 20, 2022, 8:43am UTC](https://discuss.elastic.co/t/using-custom-elastic-charts-fork-in-kibana/302780/1 "2022-04-20T08:43:46Z")

</div>

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

> <https://github.com/elastic/elastic-charts/issues/1654>
>
> I am trying to make a custom styled chart, for example changing the font color a…nd size of axis tick labels.
> 
> When I build the elastic-charts package I'm not seeing a dist folder get created despite the compiler output showing the dist folder type checking passing...
> 
> I ran 
> \`\`\`bash
> yarn
> yarn install
> yarn build
> \`\`\`
> \<details\>
> \<summary\>And got the following \</summary\>
> 
> \`\`\`bash
> jacob@Jacobs-MacBook-Pro elastic-charts % yarn build
> yarn run v1.22.18
> $ lerna run --loglevel=silent --scope @elastic/charts build --stream --no-prefix
> $ yarn build:ts && yarn build:css
> $ yarn build:clean && yarn build:compile && yarn build:check
> $ echo 'Cleaning dist...' && rm -rf ./dist
> Cleaning dist...
> $ echo 'Compiling...' && tsc -p ./tsconfig.json && tsc -p ./tsconfig.nocomments.json
> Compiling...
> $ echo 'Type checking dist...' && tsc -p ./tsconfig.check.json
> Type checking dist...
> $ yarn build:sass && yarn autoprefix:css && yarn concat:sass
> $ echo 'Building sass...' && sass src:dist --style compressed --quiet --color
> Building sass...
> $ echo 'Autoprefixing...' && yarn postcss dist/\*.css --no-map --use autoprefixer -d dist
> Autoprefixing...
> $ /Users/jacob/elastic-charts/node\_modules/.bin/postcss dist/theme\_dark.css dist/theme\_light.css dist/theme\_only\_dark.css dist/theme\_only\_light.css --no-map --use autoprefixer -d dist
> Browserslist: caniuse-lite is outdated. Please run:
> npx browserslist@latest --update-db
> $ echo 'Concat SASS...' && node scripts/concat\_sass.js
> Concat SASS...
> ✨ Done in 46.17s.
> jacob@Jacobs-MacBook-Pro elastic-charts % cd dist
> cd: no such file or directory: dist
> \`\`\`
> 
> \</details\>
> 
> Are the command prompts outdated or is there a step I'm missing or just a better way to approach this overall?

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?

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [April 20, 2022, 3:36pm UTC](https://discuss.elastic.co/t/using-custom-elastic-charts-fork-in-kibana/302780/2 "2022-04-20T15:36:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 18, 2022, 3:36pm UTC](https://discuss.elastic.co/t/using-custom-elastic-charts-fork-in-kibana/302780/3 "2022-05-18T15:36:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nickofthyme](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nickofthyme/32/60032_2.png) [@nickofthyme](https://discuss.elastic.co/u/nickofthyme)\
**Post date:** [July 8, 2022, 4:47pm UTC](https://discuss.elastic.co/t/using-custom-elastic-charts-fork-in-kibana/302780/4 "2022-07-08T16:47:31Z")

</div>

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](https://github.com/elastic/elastic-charts/issues/1654#issuecomment-1103827503).

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