- Home
- Forum
- ASP.NET MVC - EJ 2
- Only half of the chart candles are displayed
Only half of the chart candles are displayed
Hi,
I created a candlestick chart, but only half of the first and last candlesticks are displayed.
I am using Syncfusion.EJ2.MVC5.17.3.0.21.
Please tell me how to resolve.
@(Html.EJS().Chart("container2")
.Margin(mg => mg.Top(30).Left(20).Right(20))
.Height("240px")
.Background("transparent")
.Series(series =>
{
series.Type(Syncfusion.EJ2.Charts.ChartSeriesType.Candle)
.XName("Date")
.Open("Open")
.Close("Close")
.High("High")
.Low("Low")
.EnableSolidCandles(true)
.BearFillColor("#79b020")
.BullFillColor("#e54f37")
.DataSource(Model.ProfitAndLossCandles)
.Add();
})
.PrimaryXAxis(px =>
px.ValueType(Syncfusion.EJ2.Charts.ValueType.DateTime)
.LabelStyle(label => label.Color("whitesmoke"))
.LabelFormat("M/d")
)
.PrimaryYAxis(py => py.LabelStyle(label => label.Color("whitesmoke")))
.UseGroupingSeparator(true)
.Locale("ja")
.Render()
)
Attachment: image_64c121b5.zip
SIGN IN To post a reply.
3 Replies
DG
Durga Gopalakrishnan
Syncfusion Team
February 25, 2020 02:11 PM UTC
Hi Pylori,
Greetings from Syncfusion.
We have analyzed your query with the provided code snippet. We suggest you to use RangePadding as Additional for primary x-axis to view first and last candles fully. We have modified the code and attached the sample. Please check with the below code snippet and screenshot.
Code Snippet
|
@(Html.EJS().Chart("container2")
.PrimaryXAxis(px => px.RangePadding(Syncfusion.EJ2.Charts.ChartRangePadding.Additional))
.Render()
) |
Screenshot
Sample
Kindly revert us, if you have any concerns.
Regards,
Durga G
PY
Pylori
February 26, 2020 03:17 AM UTC
Hi,
Thank you for your answer.
I tried RangePadding and it was a bit different from what I was looking for.
I felt that the left and right margins were slightly larger in RangePadding.
I wanted a blank space for one candlestick.
The content of my question was missing. I'm sorry.
After receiving your answer, I was able to achieve the margin for one candlestick by trial and error and setting the values for Minimum and Maximum.
Regards,
Pylori.
DG
Durga Gopalakrishnan
Syncfusion Team
February 26, 2020 12:27 PM UTC
Hi Pyroli,
Most welcome. Kindly get in touch with us, if you need any further assistance. We are always happy in assisting you.
Regards,
Durga G
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
PY Pylori
- Feb 24, 2020 07:53 AM UTC
- Feb 26, 2020 12:27 PM UTC