%PDF- %PDF-
Direktori : /home/ugotscom/bos_naturals/resources/js/components/ |
Current File : /home/ugotscom/bos_naturals/resources/js/components/properties_bar_area_rent.vue |
<script> import { Bar } from "vue-chartjs"; export default { props:['date1','date2'], extends: Bar, data() { return { url: "/properties/propertylocationwise", years: [], labels:[], property_type:1, data: "", test:[], }; }, methods: { getProducts() { axios.get('/properties/propertylocationwise/'+this.property_type).then(response => { this.data = response.data; this.data.forEach((value,index ) => { this.labels.push(value.location); this.years.push(value.total); }); if (this.data) { this.renderChart( { labels: this.labels, datasets: [ { label: "Rent", backgroundColor: 'rgb(125, 196, 128)', data: this.years }, ] }, { responsive: true, maintainAspectRatio: false, scales: { xAxes: [{ ticks: { maxRotation: 0, minRotation: 0 } }], yAxes: [{ ticks: { min: 0, max: 200, stepSize: 20, } }] } } ); } else { console.log("NO DATA"); } }); } }, mounted() { this.getProducts(); } }; </script>