We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

how to add 3rd major axis if invisible chart total value is 1.56(Actual) + 0.64(NSO) =2.16. Decimal YAXIS

@Html.EJS().Chart("DirectOvertimeSection").Series(series =>

{

series.Width(2).XName("xValue").YName("yValue").Marker(mr => mr.DataLabel(dl => dl.Visible(true).Font(ff => ff.FontWeight("600").Color("#252323")).Position(Syncfusion.EJ2.Charts.LabelPosition.Outer))).SumIndexes(ViewBag.sumIndexes).NegativeFillColor("#1988F6").ColumnWidth(0.9).Type(Syncfusion.EJ2.Charts.ChartSeriesType.Waterfall).DataSource(ViewBag.dataSource).Add();

}).ChartArea(area => area.Border(br => br.Width(0.1))).Width("100%").Height("38%").Axes(axis =>

{

axis.Name("Secondary Axis")

.Minimum(0).LabelFormat("{value}%")

.OpposedPosition(true).Add();

}).PrimaryXAxis(py => py.ValueType(Syncfusion.EJ2.Charts.ValueType.Category).MajorGridLines(mg => mg.Width(0)).PlotOffset(20)).PrimaryYAxis(py => py.Minimum(0).MajorGridLines(mg => mg.Width(0))).LegendSettings(lg => lg.Visible(true)).Tooltip(tl => tl.Enable(true)).TextRender("textRender").AxisLabelRender("axisLabelRender").Render()


List chartData = new List

{

new WaterfallChartData { xValue = "MMA", yValue = 1.56 },

new WaterfallChartData { xValue = "Adm / Filling", yValue = 0 },

new WaterfallChartData { xValue = "Annual Laeve", yValue = 0 },

new WaterfallChartData { xValue = "End Compilation", yValue = 0 },

new WaterfallChartData { xValue = "NSO", yValue = 0.64 },

new WaterfallChartData { xValue = "Others Direct", yValue = 0 },

new WaterfallChartData { xValue = "Others Indirect", yValue = 0},

new WaterfallChartData { xValue = "Preparation", yValue = 0 },

new WaterfallChartData { xValue = "Recovery", yValue = 0 },

new WaterfallChartData { xValue = "Rework", yValue = 0},

new WaterfallChartData { xValue = "Setmen Minus", yValue = 0 },

new WaterfallChartData { xValue = "SQ Meeting", yValue = -1.41 },

new WaterfallChartData { xValue = "Training", yValue = 0.04 },

new WaterfallChartData { xValue = "Actual", yValue = 0.99},

};


Untitled.png


1 Reply

DG Durga Gopalakrishnan Syncfusion Team December 15, 2022 03:31 PM UTC

Hi Maulana,


Greetings from Syncfusion.


We request you to ensure whether you have specified maximum value for chart y axis, so that axis labels will be displayed as per specified range. We recommend you to remove the maximum range to overcome the reported problem.


As per your attached snippet and screenshot, you are trying to add another x axis in chart. We have prepared sample based on your requirement. Please check with the below screenshot and sample.



Sample : https://www.syncfusion.com/downloads/support/directtrac/general/ze/WaterfallLine-1460400303.zip


If the provided suggestion doesn’t meet your requirement, please share your requirement in detail so that it will be helpful to proceed further. Please let us know if you have any concerns.


Regards,

Durga Gopalakrishnan.


Loader.
Up arrow icon