Skip to content
This repository has been archived by the owner on Apr 29, 2020. It is now read-only.

Chart only shown on page reload, but not when routing pages (via Vue router) #44

Open
laz95 opened this issue Mar 9, 2018 · 1 comment

Comments

@laz95
Copy link

laz95 commented Mar 9, 2018

I have a component Report.vue which contains a line chart which displays when I reload the page, but doesn't when I navigate from home page to .../report using router.push(...).
Code:

<canvas id="mycanvas2" :count="testCases.length"></canvas>
      <div v-for="(testCase,index) in testCases" :key="testCase.name">
              <chartjs-line :labels="xAxisOption" :beginzero="true" :datalabel="testCase.name" ref="ch"
                            :backgroundcolor="graph.colors[index]" :bordercolor="graph.colors[index]"
                            :data="testCase.data" :bind="true" target="mycanvas2"></chartjs-line>
            </div>
@mech01nc01
Copy link

Maybe this helps

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants