我目前正在使用 Oxyplot 和演示示例(可以在那里下载https://github.com/oxyplot/oxyplot/archive/develop.zip),尤其是示例“ColumnSeriesDemo”。
这是执行时的样子:
代码:
public MainWindow()
{
this.InitializeComponent();
// Create some data
this.Items = new Collection<Item>
{
new Item {Label = "Apples", Value1 = 37, Value2 = 12, Value3 = 19},
new Item {Label = "Pears", Value1 = 7, Value2 = 21, Value3 = 9},
new Item {Label = "Bananas", Value1 = 23, Value2 = 2, Value3 = 29}
};
// Create the plot model
var tmp = new PlotModel { Title = "Column series", LegendPlacement = …Run Code Online (Sandbox Code Playgroud) 这是我现在使用的模式:
string pattern = @"^(\s+|\d+|\w+|[^\d\s\w])+$";
Regex regex = new Regex(pattern);
if (regex.IsMatch(inputString))
{
Match match = regex.Match(inputString);
foreach (Capture capture in match.Groups[1].Captures)
{
if (!string.IsNullOrWhiteSpace(capture.Value))
tmpList.Add(capture.Value);
}
}
return tmpList.ToArray<string>();
Run Code Online (Sandbox Code Playgroud)
有了这个,我检索一个字符串数组,每个单词的项目和每个标点字符的一个项目.
我现在想要实现的是将排队的标点字符分组只在一个项目中,即现在如果一个接一个地有三个点,我在我的数组中得到三个项目,每个项目包含一个点.最终我想要一个带有三个圆点的项目(或任何其他标点符号).