using ApexCharts; using Biskilog_Accounting.Shared.CustomModels; using Microsoft.AspNetCore.Components; using Microsoft.Extensions.Options; namespace Biskilog_Accounting.Client.Pages.Dashboard.Elements { public partial class ChartElement { [Parameter] public bool IsLoading { get; set; } [Parameter] public string Title { get; set; } = string.Empty; [Parameter] public string SubTitle { get; set; } = string.Empty; [Parameter] public List Series { get; set; } = new List(); [Parameter] public IEnumerable CategorySummary { get; set; } = Enumerable.Empty(); private ApexChartOptions m_options; private ApexChartOptions options = new ApexChartOptions(); protected override void OnParametersSet() { m_options = new ApexChartOptions { PlotOptions = new PlotOptions { Bar = new PlotOptionsBar { ColumnWidth = "20", } }, Colors = new List { "#11726d" }, Yaxis = new List { new YAxis { Labels = new YAxisLabels { Formatter = @"function (value, index, w) { return Number(value).toLocaleString();}" } } }, }; options.Colors = new List { "#11726d", "#096a71", "#003445", "#e69138" }; options.Fill = new Fill { Type = new List { FillType.Gradient, FillType.Gradient }, Gradient = new FillGradient { ShadeIntensity = 1, OpacityFrom = 0.2, OpacityTo = 0.9, } }; options.Yaxis = new List { new YAxis { Labels = new YAxisLabels { Formatter = @"function (value, index, w) { return Number(value).toLocaleString();}" } } }; base.OnParametersSet(); } } }