%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/ugotscom/bos_naturals/resources/js/components/
Upload File :
Create Path :
Current File : /home/ugotscom/bos_naturals/resources/js/components/properties_wanted_area_sale.vue




<script>
import { Bar } from "vue-chartjs";
export default {
  props:['date1','date2'],
  extends: Bar,
  data() {
    return {
      url: "/properties/propertylocationwise",
      years: [],
      labels:[],
      property_type:2,
      data: "",
      test:[],
    };
  },

  methods: {
    getProducts() {
      axios.get('/wantedlocations/wantedlocationwise/'+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: 1000,
          stepSize: 100,
        }
      }]
    } }
          );
        } else {
          console.log("NO DATA");
        }
      });
    }
  },
  mounted() {
    this.getProducts();
  }
};
</script>

Zerion Mini Shell 1.0