This is a migrated thread and some comments may be shown as answers.

StockChart log error with dynamic dataset

1 Answer 47 Views
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 09 Nov 2018, 02:34 PM

when i change the data-source the console prints some error.

This is the template code

<kendo-datasource
  :ref="'datasource'"
  :data="chart">
</kendo-datasource>
<kendo-stockchart
  :data-source-ref="'datasource'"
  :date-field="'date'"
  :category-axis-labels-rotation="'auto'"
  :navigator-series="navigatorSeries"
  :navigator-category-axis-labels-rotation="'auto'"
  :theme="'sass'">
    <kendo-chart-series-item
      :type="'line'"
      :field="'value'">
    </kendo-chart-series-item>
 </kendo-stockchart>

 

And this is the JS

export default {
  name: "RatingHistory",
  components: {
    StockChart,
    DataSource
  },
  data(){
    return{
      services:Object,
      historicData:[],
      fields: {
        date: { type: 'date' }
      },
      navigatorSeries: {
        type: 'area',
        field: 'value'
      }
    }
  },
  computed:{
    chart(){
      return this.historicData
    }
  },
  created(){
    this.services = new Services()
    this.fetchData()
  },
  methods:{
    async fetchData(){
      let result
      try {
        result = await this.services.getRatingHistory()
      } catch(e) {
        console.log("Error getting data--->", e)
      }
      if(result.successful && result.statusCode === 200){
        this.historicData = result.data
      }
    }
  }
};

 

The chart render as expected, but i always see this error.

 

any light on how to prevent it ?

 

1 Answer, 1 is accepted

Sort by
0
Joana
Telerik team
answered on 13 Nov 2018, 08:09 AM
Hello Daniel,

Everything seems correct in the configuration. Could you please share a stackblitz example or a sample project where the error is encountered? Then, we will be able to diagnose the cause of the issue and provide you resolution. 

Regards,
Joana
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Asked by
Daniel
Top achievements
Rank 1
Answers by
Joana
Telerik team
Share this question
or