我目前正在做一个项目,设法确定了我想要的高峰。但是,我想做更多的事情,例如在贴有特定标签的圆圈上画圈。有可能在Zedgraph中做到吗?
我在代码中附加了一个片段,该片段仅包含一个文本标签,并且我想做更多的事情,以便人们可以更轻松地识别该点。
PointPair pt = myCurve.Points[i-1];
const double offset = 0.8;
TextObj text = new TextObj("P", pt.X, pt.Y + offset,
CoordType.AxisXYScale, AlignH.Left, AlignV.Center);
text.ZOrder = ZOrder.A_InFront;
text.FontSpec.Border.IsVisible = false;
text.FontSpec.Fill.IsVisible = false;
text.FontSpec.Fill = new Fill( Color.FromArgb( 100, Color.White ) );
myPane.GraphObjList.Add(text);
Run Code Online (Sandbox Code Playgroud)
任何帮助表示赞赏!谢谢!
我正在尝试使用 Serilog 登录我的 ASP.NET Web API 项目之一中的 Elasticsearch,但不幸的是,我在 Kibana 中找不到日志。
public class Logger
{
private readonly ILogger _localLogger;
public Logger()
{
ElasticsearchSinkOptions options = new ElasticsearchSinkOptions(new Uri("xxx"))
{
IndexFormat = "log-myservice-dev",
AutoRegisterTemplate = true,
ModifyConnectionSettings = (c) => c.BasicAuthentication("yyy", "zzz"),
NumberOfShards = 2,
NumberOfReplicas = 0
};
_localLogger = new LoggerConfiguration()
.MinimumLevel.Information()
.WriteTo.File(HttpContext.Current.Server.MapPath("~/logs/log-.txt"), rollingInterval: RollingInterval.Day)
.WriteTo.Elasticsearch(options)
.CreateLogger();
}
public void LogError(string error)
{
_localLogger.Error(error);
}
public void LogInformation(string information)
{
_localLogger.Information(information);
}
}
Run Code Online (Sandbox Code Playgroud)
我可以在上面指定的文件中看到日志,但在 Elasticsearch 中看不到。所以,我想知道是否有什么方法可以调试为什么无法登录 Elasticsearch?我也愿意使用其他日志框架来登录 Elasticsearch。
*Elasticsearch 的凭证和 …