You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
2.1 KiB
45 lines
2.1 KiB
@namespace Connected.Components
|
|
@using System.Globalization;
|
|
@inherits Chart
|
|
|
|
<svg @attributes="UserAttributes" class="mud-chart-line mud-ltr" width="@ChartParent?.Width" height="@ChartParent?.Height" viewBox="0 0 650 350">
|
|
<g class="mud-charts-grid">
|
|
<g class="mud-charts-gridlines-yaxis">
|
|
@foreach (var horizontalLine in _horizontalLines)
|
|
{
|
|
<path stroke="#e0e0e0" stroke-width="0.3" d="@horizontalLine.Data"></path>
|
|
}
|
|
</g>
|
|
@if (ChartParent?.ChartOptions.XAxisLines==true)
|
|
{
|
|
<g class="mud-charts-gridlines-xaxis-lines">
|
|
@foreach (var verticalLine in _verticalLines)
|
|
{
|
|
<path stroke="gray" stroke-width="0.3" d="@verticalLine.Data"></path>
|
|
}
|
|
</g>
|
|
}
|
|
</g>
|
|
<g class="mud-charts-yaxis">
|
|
@foreach (var horizontalLineValue in _horizontalValues)
|
|
{
|
|
@((MarkupString)$"<text x='{horizontalLineValue.X.ToString(CultureInfo.InvariantCulture)}' y='{horizontalLineValue.Y.ToString(CultureInfo.InvariantCulture)}' font-size='12px' text-anchor='end' dominant-baseline='auto'>{horizontalLineValue.Value.ToString(CultureInfo.InvariantCulture)}</text>")
|
|
}
|
|
</g>
|
|
<g class="mud-charts-xaxis">
|
|
@foreach (var verticalLineValue in _verticalValues)
|
|
{
|
|
@((MarkupString)$"<text x='{verticalLineValue.X.ToString(CultureInfo.InvariantCulture)}' y='{verticalLineValue.Y.ToString(CultureInfo.InvariantCulture)}' font-size='12px' text-anchor='middle'>{verticalLineValue.Value.ToString(CultureInfo.InvariantCulture)}</text>")
|
|
}
|
|
</g>
|
|
<g class="mud-charts-line-series">
|
|
@foreach (var chartLine in _chartLines)
|
|
{
|
|
<path class="mud-chart-line" @onclick="() => SelectedIndex = chartLine.Index" fill="none" stroke="@(ChartParent.ChartOptions.ChartPalette.GetValue(chartLine.Index % ChartOptions.ChartPalette.Count()))" stroke-width="@(ChartParent.ChartOptions.LineStrokeWidth)" d="@chartLine.Data"></path>
|
|
}
|
|
</g>
|
|
|
|
@ChartParent?.CustomGraphics
|
|
</svg>
|
|
<Legend Data="@_legends" />
|