我使用折线图表,Y轴为双倍,X轴为DateTime。我的情节只有日内数据:我在上午8点到晚上10点之间每分钟有一个点。
我想强调一下情节的某些时期。第一阶段从8:50开始,持续20分钟。为此,我使用带有以下代码的stripLine:
var stripLine = new StripLine();
stripLine.BackColor = Color.White;
stripLine.BackGradientStyle = GradientStyle.TopBottom;
stripLine.BackImageTransparentColor = Color.White;
stripLine.BackSecondaryColor = Color.Transparent;
stripLine.Interval = 1;
stripLine.IntervalType = DateTimeIntervalType.Days;
stripLine.IntervalOffset = 50;
stripLine.IntervalOffsetType = DateTimeIntervalType.Minutes;
stripLine.StripWidth = 20;
stripLine.StripWidthType= DateTimeIntervalType.Minutes;
chartArea.AxisX.StripLines.Add(stripLine);
但是我没有得到正确的结果。事实上,我的所有图表区域都被带状线强调了。
答案 0 :(得分:0)
您的问题有点模糊:您的代码在8:50至9:10 A.M。
的垂直方向上划线。您想要每隔(x)创建一条带状线:50到(x + 1):10?
for(int i=0;i<24;i++)
{
var stripLine = new StripLine();
stripLine.BackColor = Color.White;
stripLine.BackGradientStyle = GradientStyle.TopBottom;
stripLine.BackImageTransparentColor = Color.White;
stripLine.BackSecondaryColor = Color.Transparent;
stripLine.Interval = (double)i;
stripLine.IntervalType = DateTimeIntervalType.Hours;
stripLine.IntervalOffset = 50;
stripLine.IntervalOffsetType = DateTimeIntervalType.Minutes;
stripLine.StripWidth = 20;
stripLine.StripWidthType = DateTimeIntervalType.Minutes;
Chart1.ChartAreas[0].AxisX.StripLines.Add(stripLine);
}
应该工作。
您是否希望在您展示的位置准确显示StripLine?
var stripLine = new StripLine();
stripLine.BackColor = Color.White;
stripLine.BackGradientStyle = GradientStyle.TopBottom;
stripLine.BackImageTransparentColor = Color.White;
stripLine.BackSecondaryColor = Color.Transparent;
stripLine.Interval = 9;
stripLine.IntervalType = DateTimeIntervalType.Hours;
stripLine.IntervalOffset = 28;
stripLine.IntervalOffsetType = DateTimeIntervalType.Minutes;
stripLine.StripWidth = 8;
stripLine.StripWidthType= DateTimeIntervalType.Seconds;
chartArea.AxisX.StripLines.Add(stripLine);
是正确的解决方案。
答案 1 :(得分:0)
<?php
$con=mysqli_connect("localhost","root","","listap");
if (mysqli_connect_errno()) {
echo "Blad przy polaczeniu z baza: " . mysqli_connect_error();
}
$result = mysqli_query($con,"SELECT * FROM 'lista'");
?>
<html>
<table border='1'>
<tr>
</tr>
<tr>
<td> <?php echo $result['nazwiskoimie'] ?> </td>
//in this part have problem to get my data from database
</html>
是行,它只允许添加彩色矩形。
要创建一个遵循样条线曲线的区域,您需要
StripLine
事件PostPaint
Series
这是第二种方式:
SplineArea