ehsan-shv / vue-tradingviewWidgets

Tradingview widgets for Vue 3 and Nuxt 3.
MIT License
91 stars 19 forks source link

Multiple charts #15

Open alexbuzzz opened 1 year ago

alexbuzzz commented 1 year ago

Hi! Is it possible to create multiple charts on screen? I'm trying this code but only the first chart appears.

This is the view code:

<template>
  <div class="watchlist-container">
    <Chart ticker="BINANCE:ADAUSDTPERP" />
    <Chart ticker="BINANCE:BTCUSDTPERP" />
  </div>
</template>

This is the component:

<template>
  <Chart
    :options="{
      autosize: false,
      height: '600',
      width: '600',
      symbol: this.ticker,
      interval: '5',
      timezone: 'Etc/UTC',
      theme: 'dark',
      style: '1',
      locale: 'en',
      toolbar_bg: '#f1f3f6',
      enable_publishing: false,
      hide_legend: true,
      allow_symbol_change: true,
      save_image: false
    }"
  />
</template>

<script>
import { Chart } from 'vue-tradingview-widgets'

export default {
  name: 'App',
  props: {
    ticker: String
  },
  components: {
    Chart
  }
}
</script>
maksalexsavchenko commented 1 year ago

Hello, i had the same problem and i have done with it, you can check on my git (without this lib)

davidrevoledo commented 8 months ago

+1