예제 #1
0
        protected override async Task OnInitializedAsync()
        {
            var data = await GetChartData(Sex.ToChartValue(), X, Y, Graph).ConfigureAwait(false);

            var options = new
            {
                Title = SubTitle = ChartSubTitles.GetTitle(Graph, Growth),
                Width = 550,
                height = 350,
                hAxis = new { Title = Titles.GetHaxisTitle(Growth), Ticks = Ticks.GetHaxisTicks(Graph, Growth) },
                vAxis = new { Title = Titles.GetVaxisTitles(Growth), Ticks = Ticks.GetVaxisTicks(Graph, Growth) },
                Legend = new
                {
                    Display = true,
                    Position = "right"
                },
                CurveType = "Function",
                series = Series.GetSeries(Graph, Growth),
                Annotations = new
                {
                    Style = "line",
                    Color = "#d3d3d3",
                    TextStyle = new
                    {
                        Color = "#d3d3d3",
                        Opacity = 0.5,
                        Stem = new
                        {
                            Color = "#d3d3d3",
                            Opacity = 0.5,
                        }
                    }
                }
            };

            await JsRuntime.InvokeAsync<Task>("drawChart", data, options).ConfigureAwait(false);
        }