GimmyHchs / vue-charts

Base on Vue2.0 wrapper for ChartJs. (Deprecated)
MIT License
357 stars 84 forks source link

Graphics on target canvas many dupes or not work #45

Open psy21d opened 6 years ago

psy21d commented 6 years ago
              <canvas id="mixbar"></canvas>
              <chartjs-line :datalabel="'likes'" :labels="likes.labels" :data="likes.data" :bind="true"
                            :backgroundcolor="'#2c8866'"
                            :bordercolor="'#2c8866'" :option="chart_likes_o" target="mixbar"></chartjs-line>
              <chartjs-line :datalabel="'reposts'" :labels="reposts.labels" :data="reposts.data" :bind="true"
                            :backgroundcolor="'#2c88c9'"
                            :bordercolor="'#2c88c9'" target="mixbar" :option="chart_reposts_o"></chartjs-line>
             <chartjs-line target="mixbar" ></chartjs-line>
             <chartjs-line target="mixbar" ></chartjs-line>
            </div>

make mady dupes on reload parent component. erroneous

<div class="box_chart" style="position: relative; height:300px; width:600px">
<canvas id="mixbar"></canvas>
<chartjs-line target="mixbar" ></chartjs-line>
<chartjs-line target="mixbar" ></chartjs-line>
</div>

not work at all (empty screen and empty html)