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; 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 = new ApexChartOptions { Chart = new Chart { Height = 400, }, Colors = new List { "#11726d", "#54ff00", "#003445", "#e69138", "#a2896d", "#b13a2c", "#b0cba8", "#e4e1da", "#696cff", "#03c3ec" }, Fill = new Fill { Type = new List { FillType.Gradient, FillType.Gradient }, Gradient = new FillGradient { ShadeIntensity = 1, OpacityFrom = 0.2, OpacityTo = 0.9, } }, Yaxis = new List { new YAxis { Labels = new YAxisLabels { Formatter = @"function (value, index, w) { return Number(value).toLocaleString();}" } } }, Legend = new Legend { Position = LegendPosition.Bottom, } }; base.OnParametersSet(); } } }