Skip to content

Commit 9f0bf65

Browse files
committed
998039: Updated changes.
1 parent e53cb21 commit 9f0bf65

File tree

2 files changed

+34
-12
lines changed

2 files changed

+34
-12
lines changed
15.8 KB
Loading

blazor/stock-chart/legend.md

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -571,21 +571,43 @@ To use, add a `LegendItemTemplate` inside any [StockChartSeries](https://help.sy
571571
```
572572
@using Syncfusion.Blazor.Charts
573573
574-
<SfStockChart Title="AAPL Stock Price" SelectionMode="SelectionMode.Series">
575-
<StockChartLegendSettings Visible="true" ToggleVisibility="true">
576-
</StockChartLegendSettings>
574+
<SfStockChart Title="AAPL vs GOOGL Stock Price" SelectionMode="SelectionMode.Series">
575+
<StockChartLegendSettings Visible="true" ToggleVisibility="true" />
577576
<StockChartSeriesCollection>
578577
<StockChartSeries DataSource="@StockDetails" Type="ChartSeriesType.Line" XName="Date" High="High" Low="Low" Open="Open" Close="Close" Name="Apple Stock Price" Fill="red">
579578
<LegendItemTemplate>
580-
<div style="font-weight:800; font-family:'Segoe UI'; color: red">
581-
<span>Apple Stock Price</span>
579+
<div style="display:flex; align-items:center; gap:10px; padding:4px 0;">
580+
<span style="font-size:18px;">🍎</span>
581+
<div style="display:flex; flex-direction:column; line-height:1.15;">
582+
<span style="font-family:'Segoe UI'; font-size:14px; font-weight:700; color:red;">
583+
Apple Stock Price
584+
</span>
585+
<span style="font-size:12px; opacity:0.85;">
586+
AAPL OHLC rendered as Line
587+
</span>
588+
<span style="font-size:12px; opacity:0.75;">
589+
Points: @StockDetails.Count
590+
</span>
591+
</div>
582592
</div>
583593
</LegendItemTemplate>
584594
</StockChartSeries>
595+
585596
<StockChartSeries DataSource="@StockDetails" Type="ChartSeriesType.Spline" XName="Date" High="High" Low="Low" Open="Open" Close="Close" Name="Google Stock Price" Fill="cornflowerblue">
586597
<LegendItemTemplate>
587-
<div style="font-weight:800; font-family:'Segoe UI'; color: cornflowerblue">
588-
<span>Google Stock Price</span>
598+
<div style="display:flex; align-items:center; gap:10px; padding:4px 0;">
599+
<span style="font-size:18px;">🔍</span>
600+
<div style="display:flex; flex-direction:column; line-height:1.15;">
601+
<span style="font-family:'Segoe UI'; font-size:14px; font-weight:700; color:cornflowerblue;">
602+
Google Stock Price
603+
</span>
604+
<span style="font-size:12px; opacity:0.85;">
605+
GOOGL OHLC rendered as Spline
606+
</span>
607+
<span style="font-size:12px; opacity:0.75;">
608+
Points: @StockDetails.Count
609+
</span>
610+
</div>
589611
</div>
590612
</LegendItemTemplate>
591613
</StockChartSeries>
@@ -596,11 +618,11 @@ To use, add a `LegendItemTemplate` inside any [StockChartSeries](https://help.sy
596618
public class ChartData
597619
{
598620
public DateTime Date { get; set; }
599-
public Double Open { get; set; }
600-
public Double Low { get; set; }
601-
public Double Close { get; set; }
602-
public Double High { get; set; }
603-
public Double Volume { get; set; }
621+
public double Open { get; set; }
622+
public double Low { get; set; }
623+
public double Close { get; set; }
624+
public double High { get; set; }
625+
public double Volume { get; set; }
604626
}
605627
606628
public List<ChartData> StockDetails = new List<ChartData>

0 commit comments

Comments
 (0)