Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
149109 | Nov 14,2019 04:06 PM UTC | Dec 2,2019 11:52 AM UTC | Angular - EJ 2 | 7 |
![]() |
Tags: Chart |
public primaryXAxis: Object = {
valueType: 'Category', labelRotation: 90,
border: { width: 1, type: 'Rectangle' },
isIndexed: false, interval: 1, majorGridLines: { width: 0 },
multiLevelLabels: [{
border: { type: 'Rectangle' },
textStyle: { fontWeight: 'Bold' },
categories: [
{ start: -0.5, end: 3.5, text: 'FRUIT STOCK', },
{ start: 3.5, end: 6.5, text: 'VEGETABLE STOCK', },
]
}]
}; |
public Stackingdata: Object[] = [
{
"sourceName": "FRUIT STOCK",
"category": "APPLE",
"available": 322863369.39567536,
"recommended": 288060444.7157002,
"color": "#00bdae"
},
{
"sourceName": "VEGETABLE STOCK",
"category": "RADDISH",
"available": 101302197.82,
"recommended": 244373320.9,
"color": "#404041"
},
{
"sourceName": "FRUIT STOCK",
"category": "MANGO",
"available": 278946730.6608295,
"recommended": 270552545.95190006,
"color": "#357cd2"
},
{
"sourceName": "VEGETABLE STOCK",
"category": "CARROT",
"available": 994168700.568088097,
"recommended": 976420500.674899999,
"color": "#e56590"
},
{
"sourceName": "VEGETABLE STOCK",
"category": "SPINACH",
"available": 227006193.11418274,
"recommended": 222311874.73494303,
"color": "#f8b883"
},
{
"sourceName": "FRUIT STOCK",
"category": "ORANGE",
"available": 338344410.706323504,
"recommended": 300375410.716289997,
"color": "#70ad47"
},
{
"sourceName": "FRUIT STOCK",
"category": "GRAPES",
"available": 140635000.462,
"recommended": 140635000.462,
"color": "#dd8abd"
}];
public data1: Object[] = [];
public data2: Object[] = [];
public load(args: ILoadedEventArgs): void {
for(let i=0; i < this.Stackingdata.length; i++) {
if(this.Stackingdata[i]['sourceName'] === 'FRUIT STOCK') {
this.data1.push(this.Stackingdata[i]);
} else {
this.data2.push(this.Stackingdata[i]);
}
}
}; |
import { ChartAllModule } from '@syncfusion/ej2-angular-charts';
import { DatePickerModule } from '@syncfusion/ej2-angular-calendars';
import { NumericTextBoxModule } from '@syncfusion/ej2-angular-inputs';
import { ButtonModule } from '@syncfusion/ej2-angular-buttons';
import { HttpModule } from '@angular/http';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';
import { CommonModule } from '@angular/common';
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from '../app.component';
@NgModule({ declarations: [ AppComponent ], imports: [ ChartAllModule, BrowserModule, ButtonModule], providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
}
|
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.