I am facing one issue with Spline chart , in chart normally on Y axis the values are 0,2,4,6,8 and on X axis the labels are JAN , FEB , MAR , APR and so on .
But my Requirement is that on Y axis there should be Labels and on X Axis their should be values and chart should be worked as per Y axis .
So Any one can Help me this Problem .
Code is :
.ts file
.html file
|
<ejs-chart isTransposed="true"></ejs-chart> |
Thank You for your help . It helped me a lot.
One Question Regarding Syncfusion Charts :
When in HighCharts we want to import All highcharts in component
so we use : import * as Highcharts from 'highcharts';
and to take input : @Input() chart: Highcharts.Chart; is used .
So in synchfusion can i get this type of approach?
if yes than can you please send me code for syncfusion same as highcharts
|
app.module.ts
import { ChartAllModule, AccumulationChartAllModule } from '@syncfusion/ej2-angular-charts';
@NgModule({ imports: [ ChartAllModule, RangeNavigatorAllModule,AccumulationChartAllModule]
})
app.component.ts
import { ChartComponent } from '@syncfusion/ej2-angular-charts';
export class AppComponent {
@ViewChild('chart')
public chart: ChartComponent;
} |
Hello ,
I just want to know that for displaying Stacktotal value in Column stack Chart Tooltip , is there any built in function so that by which we can call and display in tool tip
My Tooltip code :
'${series.name}: ${point.y}</br>Total : ${point.stackTotal}'
So from my knowledge point.stackTotal is used in highcharts so like that in syncfusion is there any function .
Please reply Fast so that i can implement .
|
public tooltipRender(args: ITooltipRenderEventArgs): void{
args.text = args.text +"<br>" + "Total : "+ args.series.stackedValues.endValues[args.point.index];
} |
Hello Team ,
Thank you for reply .
This solution worked but i would like tell you that after running it is showing perfectly but it is giving error . Please Look Below Snippet:
I'm importing : imports{ITooltipRenderEventArgs } from '@syncfusion/ej2-angular-charts';
I want to use only this import not any other so please resolve this one.
So please tell me why it is giving me error , in project we can't use error code .
and one issue while hovering on stacks , the total value remains same like for first stack the total value is 425.1
so it should remains same when we hover on any stack .
In your code it is adding the stack when we hover over stacks . So please Fix Both the issues as soon as possible .
And Please Reply Fast .
Thank You for Your Support :)
|
public stackedValues : Array<any> =[];
public tooltipRender(args: ITooltipRenderEventArgs): void{
args["text"] = args["text"] +"<br>" + "Total : "+ this.stackedValues[args["point"].index];
};
public textRender(args: ITextRenderEventArgs): void{
this.stackedValues = args.series["stackedValues"].endValues;
}; |