ant-design-charts-blazor
ant-design-charts-blazor copied to clipboard
Setting line colors from object data
One of base usage its setting color lines by series(from data), but i cant do it in current chart. Maybe someone know way how to do it?
I can do it in Scutter by ColorField but Scutter dont allow multiple series
show you config and data
Try this
ColorField: "Genre",
Color = new string[] {"#d62728", "#2ca02c", "#000000", "#9467bd", "#ffd500", "#1f77b4", "#00518a", "#ffbc69", "#9bd646"},
show you config and data
protected LineConfig ChartConfig = new LineConfig { Title = new AntDesign.Charts.Title { Visible = true, Text = "Cloud Orders" } Point = new LineViewConfigPoint { Visible = true, Size = 3, Color = "Grey" }, Tooltip = new AntDesign.Charts.Tooltip() { Shared = false }, ForceFit = true, Padding = "auto", XField = "timelabel", YField = "price", Color = "transparent", YAxis = new ValueAxis() { Grid = new BaseAxisGrid() { Visible = true }, Visible = true }, Legend = new Legend { Position = "bottom" }, SeriesField = "key" };
Try this
Color = new string[] {"#d62728", "#2ca02c", "#000000", "#9467bd", "#ffd500", "#1f77b4", "#00518a", "#ffbc69", "#9bd646"},
Try this
ColorField: "Genre", Color = new string[] {"#d62728", "#2ca02c", "#000000", "#9467bd", "#ffd500", "#1f77b4", "#00518a", "#ffbc69", "#9bd646"},
ColorField Does not exist in LineConfig. Im try using Scutter but scutter not contains SeriesField for multiply series
Show how lines are drawn on a chart
When color is "transparent" draw only points, but when im switch to show lines they have random colors
protected async Task SetLines() { if (ShowLines) { ChartConfig.Color = new string[] { "Red", "Green" }; } else ChartConfig.Color = "transparent"; await Chart.UpdateConfig(ChartConfig); }
Graf seems like this: