Reload page on navbar?

Hello guys, i have the following problem. i am using chart js plugins inside my website. if i reload my side via “f5” i get the following output:


if i am using now my nav-bar and go back to this page with that chart i get the following output: 2

the plugin for the colors and the plugin for the labels dont load in. can i change the route that my page is reloading everything somehow ?

Is this plugin an ember addon? How is it being loaded on your site?

1 Like

its included in the index.js file

'use strict';

module.exports = {
  name: require('./package').name,

  included() {
    this._super.included.apply(this, arguments);




and i used it in the chart options if i create the chart.

  plugins: {
          labels: [{
                 render: 'label',

its a npm package

The reason I ask is this sounds like a problem with the way that the chart code is initialized. Generally any ember addon that wraps a charting library will provide some way of hooking the chart initialization code into the Ember component lifecycle. My guess is that your chart code is only getting run in certain circumstances and there is a break in the behavior that chart.js expects and that your Ember app is providing. I would take a look at the addon code for ember-cli-chart to see how their chart components and initialization code works. Or of course you could just try the addon instead. And if you have any specific questions about any of it feel free to ask here!

1 Like

yeah i will look into the addon later how they initialize the chart. the thing is the normal chart is initialized with the right data in it. its just the chart js addons that have a problem.