import { ChartAllModule, StockChartModule, StockChartAllModule, DateTimeService, LegendService,
TooltipService, CategoryService, LineSeriesService, ColumnSeriesService,
DataLabelService, CandleSeriesService, SplineSeriesService, RangeTooltipService, StepLineSeriesService,
ParetoSeriesService, SplineAreaSeriesService, MultiColoredLineSeriesService} from '@syncfusion/ej2-angular-charts';
@NgModule({
declarations: [SyncfusionChartComponent]
imports: [StockChartModule,ChartAllModule, StockChartAllModule ],
providers: [ DateTimeService, LegendService, TooltipService, DataLabelService,
CandleSeriesService, ColumnSeriesService, CategoryService, LineSeriesService,
SplineSeriesService, RangeTooltipService, StepLineSeriesService, ParetoSeriesService,
SplineAreaSeriesService, MultiColoredLineSeriesService],
})
---------------------------------------------------------------
chart component
....
ngOnInit(): void {
this.stockData = [
{
date: new Date( '2012-04-02' ),
open : 85.9757,
high : 90.6657,
low : 85.7685,
close : 90.5257,
volume : 660187068
},
{
date: new Date( '2012-04-09' ),
open : 89.4471,
high : 92,
low : 86.2157,
close : 86.4614,
volume : 912634864
},
...
]
this.data2 = [{date: new Date(2012, 3, 1), amount: 3000000 },{date: new Date(2015, 3, 1), amount: 10000000 }, {date: new Date(2018, 3, 1), amount: 16000000}]
this.crosshair = { enable: true };
this.primaryYAxis = {
// plotOffset: 25,
rowIndex: 1,
opposedPosition: false,
rangePadding: 'None',
};
this.primaryXAxis = { valueType: 'DateTime' };
this.marker = { visible: true, width: 10, height: 10 };
}
-------------------------------------------
package.json
"@syncfusion/ej2-angular-charts": "^18.4.47",
}
-------------------------------------------
Any help finding a solution would be very helpful, or maybe this is a bug? Thanks in advance!