You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: blazor/chart/strip-line.md
+66-4Lines changed: 66 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -250,7 +250,67 @@ To create a stripline in a specific region with respect to a segment (segmented
250
250
251
251
## Stripline tooltip
252
252
253
-
Stripline tooltips provide additional contextual information on interaction with striplines in the chart. To display a tooltip on a stripline, add the **ChartStriplineTooltip** component inside the desired **ChartStripline** and set the **Enable** property to **true**. This feature is particularly useful for explaining the significance of specific ranges or thresholds marked by striplines.
253
+
Stripline tooltips provide additional contextual information on interaction with striplines in the chart. To display a tooltip on a stripline, add the **ChartStriplineTooltip** component inside the desired **ChartStripline** and set the **Enable** property to **true**. It is particularly useful for explaining the significance of specific ranges or thresholds marked by striplines.
254
+
255
+
### Default stripline tooltip code example:
256
+
257
+
Below is the simplest way to enable a stripline tooltip using default settings. The tooltip will display on interaction with the stripline.
<ChartPrimaryYAxis Minimum="0" Maximum="1400" Interval="200" Title="Number of vehicles">
279
+
</ChartPrimaryYAxis>
280
+
281
+
<ChartSeriesCollection>
282
+
<!-- Vibrant spline series color -->
283
+
<ChartSeries Type="ChartSeriesType.Spline"
284
+
DataSource="@Traffic"
285
+
XName="Time"
286
+
YName="Vehicles"
287
+
Width="2"
288
+
Fill="#F43F5E">
289
+
</ChartSeries>
290
+
</ChartSeriesCollection>
291
+
</SfChart>
292
+
293
+
@code {
294
+
public class TrafficPoint
295
+
{
296
+
public DateTime Time { get; set; }
297
+
public double Vehicles { get; set; }
298
+
}
299
+
300
+
public List<TrafficPoint> Traffic = new ()
301
+
{
302
+
new TrafficPoint { Time = new DateTime(2024, 01, 01, 06, 00, 00), Vehicles = 380 },
303
+
new TrafficPoint { Time = new DateTime(2024, 01, 01, 07, 00, 00), Vehicles = 820 },
304
+
new TrafficPoint { Time = new DateTime(2024, 01, 01, 08, 00, 00), Vehicles = 1200 },
305
+
new TrafficPoint { Time = new DateTime(2024, 01, 01, 09, 00, 00), Vehicles = 980 },
306
+
new TrafficPoint { Time = new DateTime(2024, 01, 01, 10, 00, 00), Vehicles = 650 },
307
+
new TrafficPoint { Time = new DateTime(2024, 01, 01, 11, 00, 00), Vehicles = 520 }
308
+
};
309
+
}
310
+
311
+
```
312
+
313
+

254
314
255
315
### Tooltip customization properties
256
316
@@ -292,6 +352,8 @@ The **ChartStriplineTooltipBorder** component enables you to add and customize b
292
352
293
353
-**Color** - Defines the color of the tooltip border. Accepts any valid CSS color value.
294
354
355
+
### Customized stripline tooltip code example:
356
+
295
357
```cshtml
296
358
297
359
@using Syncfusion.Blazor.Charts
@@ -338,15 +400,15 @@ The **ChartStriplineTooltipBorder** component enables you to add and customize b
338
400
public double Revenue { get; set; }
339
401
}
340
402
341
-
public List<RevenuePoint> SalesData = new()
403
+
public List<RevenuePoint> SalesData = new()
342
404
{
343
405
new RevenuePoint { Quarter = "Q1", Revenue = 78 },
344
406
new RevenuePoint { Quarter = "Q2", Revenue = 88 },
345
407
new RevenuePoint { Quarter = "Q3", Revenue = 99 },
346
408
new RevenuePoint { Quarter = "Q4", Revenue = 92 }
347
409
};
348
410
349
-
public List<RevenuePoint> SupportData = new()
411
+
public List<RevenuePoint> SupportData = new()
350
412
{
351
413
new RevenuePoint { Quarter = "Q1", Revenue = 70 },
352
414
new RevenuePoint { Quarter = "Q2", Revenue = 83 },
@@ -357,7 +419,7 @@ The **ChartStriplineTooltipBorder** component enables you to add and customize b
357
419
358
420
```
359
421
360
-

422
+

361
423
362
424
N> Refer to our [Blazor Charts](https://www.syncfusion.com/blazor-components/blazor-charts) feature tour page for its groundbreaking feature representations and also explore our [Blazor Chart Example](https://blazor.syncfusion.com/demos/chart/line?theme=bootstrap5) to know various chart types and how to represent time-dependent data, showing trends at equal intervals.
0 commit comments