Blazor-ApexCharts icon indicating copy to clipboard operation
Blazor-ApexCharts copied to clipboard

No Gridlines on DateTime Axis

Open Nachtwind85 opened this issue 3 years ago • 1 comments

Hi,

After trying to figure out how to do this i am simply out of my wits but cant really believe this is a bug.. but nevertheless if it is i may just report it:

` <ApexChart TItem="cLFCount" Title="(CAST01)" XAxisType="XAxisType.Datetime" Options="options" >

                    <ApexPointSeries TItem="cLFCount"
                                    Items=""
                                    Name=""
                                    SeriesType="SeriesType.Line"
                                    XValue="@(e => e.Date)"
                                    YValue="@(e => e.Count)"
                                    OrderBy="e=>e.X" />

                    <ApexPointSeries TItem="cLFCount"
                                    Items=""
                                    Name=""
                                    SeriesType="SeriesType.Line"
                                    XValue="@(e => e.Date)"
                                    YValue="@(e => (decimal?) e.rollingAverage)"
                                    OrderBy="e=>e.X" />
                </ApexChart>`

Bild_2022-07-27_084057491

So far the Chart works somewhat as intended but i need to add gridlines for the (Datetime) x axis as well... Therefore i added the following parts of code in OnInitializedAsync():

` options.Grid = new Grid { Show = true, Position = GridPosition.Back, }; options.Xaxis = new XAxis { AxisTicks = new AxisTicks { Show = true }, AxisBorder = new AxisBorder { Show = true }, TickAmount = 48, Title = new AxisTitle { OffsetY = 5, Text = "Uhrzeit", Style = new AxisTitleStyle { FontSize = "14px", Color = "lightgrey" } },

        };`

Unfortunately, as seen on the picture, it wont show any vertical gridlines. I am currently out of my wits and think that this may be some sort of bug.. but if that would be the case i had expected someone else to find it earler...

I use the following: Net 6 Blazor-Apexcharts - 0.9.13-beta

Thanks in advance

Nachtwind85 avatar Jul 27 '22 06:07 Nachtwind85

Screenshot_1

options.Grid = new Grid() { Row = new GridRow() { Colors = new List() { "#e5e5e5", "transparent" },Opacity = 0.5 }, Column = new GridColumn() { Colors = new List() { "#f8f8f8", "transparent" } }, Xaxis = new GridXAxis { Lines = new Lines() { Show = true } } }; https://apexcharts.com/docs/grid/

kiranmaya avatar Jul 30 '22 06:07 kiranmaya