Adding an indicator after removal of any indicator or when an other indicator already exists (or any update on the chart once added)

I have a problem once I add in Indicator the StockChart (angular)
- Can't add any other indicator
- Can't add the same again even if I delete it
- Can't compare other charts or update the main chart datasource, sometimes even the existing chart is broken once I delete the indicator.

core.js:6210 ERROR TypeError: Cannot convert undefined or null to object

    at Function.keys (<anonymous>)

    at TechnicalIndicator.processJsonData (ej2-charts.es2015.js:6094)

    at TechnicalIndicator.dataManagerSuccess (ej2-charts.es2015.js:6435)

    at TechnicalIndicator.refreshDataManager (ej2-charts.es2015.js:6412)

    at Chart.initializeDataModule (ej2-charts.es2015.js:9696)

    at Chart.processData (ej2-charts.es2015.js:9674)

    at Chart.cartesianChartRendering (ej2-charts.es2015.js:9286)

    at Chart.render (ej2-charts.es2015.js:9273)

    at Chart.appendTo (ej2-base.es2015.js:6935)

    at CartesianChart.initializeChart (ej2-charts.es2015.js:35130)

Here is this code:

<ejs-stockchart #stockChart id="chartStock" [enableSelector]=false [enablePeriodSelector]=false theme='Bootstrap' [primaryXAxis]='primaryXAxis' [primaryYAxis]='primaryYAxis' [axes]='axes' [rows]='rows' [tooltip]='tooltip' [crosshair]='crosshair'

    [zoomSettings]='zoomSettings' (axisLabelRender)='axisLabelRender($event)'>

    <e-stockchart-series-collection>

        <e-stockchart-series name="my_volume" [dataSource]="chartData" type='Column' xName='date' yName='volume' volume='volume' yAxisName='volume_axis' [enableTooltip]=false></e-stockchart-series>

        <e-stockchart-series [name]="my_serie" [dataSource]="chartData" type="HiloOpenClose" xName="date" yName='close' Open="open" High="high" Low="low" Close="close" Volume="volume" bearFillColor='#2ecd71' bullFillColor='#e74c3d'>

            <e-trendlines>

                <e-trendline type='Polynomial' width=0 fill='#9D36F1' [enableTooltip]=true></e-trendline>

            </e-trendlines>

        </e-stockchart-series>

    </e-stockchart-series-collection>

</ejs-stockchart>


public onIndicatorChange(args: any): void {

    if (args.value === 'ADD') {

      this.stockChart.axes.push({

        labelFormat: 'n2',

        name: 'ADL_axis',

        rowIndex: 1,

        majorGridLines: { width: 0 },

      });

      this.stockChart.indicators.push({

        type: 'AccumulationDistribution',

        field: 'Close',

        seriesName: 'my_name',

        yAxisName: 'ADL_axis',

        fill: 'blue',

        period: 3,

        animation: { enable: true },

      });

    } else {

      this.stockChart.indicators.pop();

      this.stockChart.axes.pop();

    }

    this.stockChart.refresh();

  }



4 Replies

DG Durga Gopalakrishnan Syncfusion Team June 29, 2021 03:51 PM UTC

Hi Ghassen, 

We are validating your reported scenario. We will update the further details within one business day(30th June 2021). We appreciate your patience until then. 

Regards, 
Durga G


GV Gowthama Venkatesan Syncfusion Team June 30, 2021 11:01 AM UTC

Hi Ghassen,  

We have considered your queries as a bug and logged a defect report. This fix will be available in our upcoming weekly patch release which is scheduled to be rolled out on 13th  July 2021. We appreciate your patience until then. You can keep track of the bug from the below feedback link.  
  

If you have any more specification/precise replication procedure or a scenario to be tested, you can add it as a comment in the portal.   
  
Please revert us if you have any concerns.  
  
Regards,   
Gowthama V. 



DG Durga Gopalakrishnan Syncfusion Team July 14, 2021 03:21 PM UTC

Hi Ghassen, 

We are working on the reported issue. We will include this fix in our next weekly patch release. We appreciate your patience until then. 

Regards, 
Durga G


DG Durga Gopalakrishnan Syncfusion Team July 20, 2021 03:41 PM UTC

Hi Ghassen, 
 
We have fixed the reported issue. Due to some technical issues, we are unable to include the fix in this patch release, we will include this fix in our next patch release. We have generated custom package for fixed issue. We request you to use the method getStockChartIndicators to add required indicators. 
 
stockChart.getStockChartIndicators('Rsi'); 
stockChart.getStockChartIndicators('AccumulationDistribution'); 
 
 
Please revert us, if you have any concerns. 
 
Regards, 
Durga G 


Loader.
Up arrow icon