Graphing Library (OxyPlot?) for NoesisGUI (C#)
I'm very new to NoesisGUI and am working on creating an application that will, among other things, include a graph with dynamic data to the user. The application is currently just in C#. The best thing I could find was a Unity3D port of OxyPlot created a few years ago (viewtopic.php?t=905). I made several modifications to get the assemblies to build, and am now working on integrating them into my application.
I'm essentially starting with a basic example from OxyPlot (http://docs.oxyplot.org/en/latest/getti ... -xaml.html), which works just fine in my Blend/WPF solution. Unfortunately, the Noesis application throws the following exception when trying to load the control with the graph:
GraphControl.xaml(8): Unknown type 'Plot'
I'm hoping I'm missing something simple. Below are the relevant code snippets. Does anything stand out? Are there other approaches/libraries that would be better to start with (I didn't find any)?
GraphControl.xaml.cs:
GraphControl.xaml:
I also tried explicitly referencing my (re)ported OxyPlot assemblies in the xaml with the same result:
I can create a Plot and series data in code behind with no issues.
Thanks
I'm essentially starting with a basic example from OxyPlot (http://docs.oxyplot.org/en/latest/getti ... -xaml.html), which works just fine in my Blend/WPF solution. Unfortunately, the Noesis application throws the following exception when trying to load the control with the graph:
GraphControl.xaml(8): Unknown type 'Plot'
I'm hoping I'm missing something simple. Below are the relevant code snippets. Does anything stand out? Are there other approaches/libraries that would be better to start with (I didn't find any)?
GraphControl.xaml.cs:
Code: Select all
public partial class GraphControl : UserControl
{
public GraphControl()
{
InitializeComponent();
}
#if NOESIS
private void InitializeComponent()
{
GUI.LoadComponent(this, "GraphControl.xaml");
}
#endif
}
Code: Select all
<UserControl x:Class="Example1.Controls.GraphControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:oxy="http://oxyplot.org/wpf"
xmlns:local="clr-namespace:Example1.Controls"
DataContext="{Binding RelativeSource={RelativeSource Self}}">
<Grid>
<oxy:Plot>
<!-- Much like the example from OxyPlot, I previously had hardcoded data defined in code-behind, but I removed it for simplicity. -->
</oxy:Plot>
</Grid>
</UserControl>
Code: Select all
xmlns:oxy="clr-namespace:OxyPlot.Wpf;assembly=OxyPlot.Noesis.Wpf"
Thanks
-
sfernandez
Site Admin
- Posts: 2974
- Joined:
Re: Graphing Library (OxyPlot?) for NoesisGUI (C#)
Hi,
NoesisGUI doesn't load any assembly, it relies on domain loaded assemblies to search for any type referenced in the xaml.
I guess you are not loding the assembly containing OxyPlot type definitions before NoesisGUI is started.
You should manually load it (if not referenced in the project) before any xaml gets loaded by Noesis.
Please let me know if that fixes your problem.
NoesisGUI doesn't load any assembly, it relies on domain loaded assemblies to search for any type referenced in the xaml.
I guess you are not loding the assembly containing OxyPlot type definitions before NoesisGUI is started.
You should manually load it (if not referenced in the project) before any xaml gets loaded by Noesis.
Please let me know if that fixes your problem.
Who is online
Users browsing this forum: Ahrefs [Bot] and 2 guests