JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.13/vue.min.js"></script>
<div id="demo">
  <pre>{{ $data | json }}</pre>
  <button @click="myCondition=!myCondition">toggle</button>
  <div id="chart" v-show="showChart"></div>
</div>

CSS

#chart {
  width: 200px;
  height: 200px;
  background: blue;
}

JavaScript

new Vue({
  el: '#demo',
  
  data: {
    myCondition: false
  },
  
  computed: {
    showChart: function () {
      if (this.myCondition) {
        console.log('show chart')
      } else {
        console.log('hide chart')
      }
      
      return this.myCondition
    }
  }
})