This is the discussion forum for OxyPlot.
For bugs and new features, use the issue tracker located at GitHub.
Also try the chat room!

Windows Store App Certification Kit Error

Oystein Bjorke 10 years ago 0
This discussion was imported from CodePlex

IBlueSun wrote at 2012-09-22 03:14:

Hello

I was trying to certify my app that using OxyPlot and the certification kit software gave me this error

 

Supported API test

FAILED
Supported APIs
  • Error Found: The supported APIs test detected the following errors:
    • API CreateFontW in gdi32.dll is not supported for this application type. OxyPlot.dll calls this API.
    • API DeleteDC in gdi32.dll is not supported for this application type. OxyPlot.dll calls this API.
    • API DeleteObject in gdi32.dll is not supported for this application type. OxyPlot.dll calls this API.
    • API GetTextExtentPoint32W in gdi32.dll is not supported for this application type. OxyPlot.dll calls this API.
    • API SelectObject in gdi32.dll is not supported for this application type. OxyPlot.dll calls this API.
    • API GetDC in user32.dll is not supported for this application type. OxyPlot.dll calls this API.
  • Impact if not fixed: Using an API that is not part of the Windows SDK for Windows Store apps violates the Windows Store certification requirements.
  • How to fix: Review the error messages to identify the API that is not part of the Windows SDK for Windows Store apps. Please note, C++ apps that are built in a debug configuration will fail this test even if it only uses APIs from the Windows SDK for Windows Store apps. See the link below for more information:
    Alternatives to Windows APIs in Windows Store apps.   

 

I 've used the OxyPlot Metro from the Nuget package  visual studio 2012

 

is there are any workaround I can make :) ??

 

thank you 


objo wrote at 2012-09-24 08:41:

I have excluded Svg\NativeMethods from the PCL/Metro project, let us know if this solves the problem!


ibluesun wrote at 2012-09-24 12:31:

Amazing 

yes this solved my problem and I passed the verification kit.

 

Thank you :) :)

 

I am now waiting for the store to verify my app.


objo wrote at 2012-09-24 15:07:

Good! It would be interesting to see the resulting app (the first oxyplot based app in the store I guess) - can you post a link to the store when the app is verified?


ibluesun wrote at 2012-09-24 23:49:

ofcourse I'll post the link once it is verified .. 

it is a simple app that parse a function and draw it with OxyPlot  .. (hope you like it when it is published)

for now I am waiting ...   :)


doctorj wrote at 2012-09-29 16:16:

 

Hi ,

 

I see that you are trying to get your app certified through the Windows Store.

I have run into a different problem than you , I am developing in VB and I link the runtime cv++ into my app as a reference. I found out that it is needed to make oxyplot work. My app runs fine in the development environment but when I go to verify the package it gives me the errors I describe below.

How did you get around this problem?

Thanks Jerry

 

Oxyplot works fine in my app when I run it in the development environment on vs2012.

I tried to package my app today for the windows store and ran into some problems.

I got an error message telling me the one of the components in my package needs VCLIBS version 11.0.50522.1 and that the version of VCLIBS I have installed on the machine is VCLIBS 11.0..... or not the same version needed to the component ( I assume a lower version)

I took vcblibs out of the references and tried to oxyplot  in the development environment and it did not work , so I verified that it is oxyplot that needs vclibs to execute.

Can you help me? do I have to get an updated C++ library from Microsoft to package oxyplot for the Windows Store? which version of the C++ library does oxyplot use?

You help would be greatly appreciated , I what to package the app and submit it to the store as soon as I can.

Thanks Jerry


objo wrote at 2012-09-29 19:07:

hi Jerry, did you use the latest version where I removed the native methods?

The references are optimized - OxyPlot.dll only depends on ".NET Portable Subset" and OxyPlot.Metro.dll only depends on ".NET for Windows Store apps" and "Windows". There are no dependencies on C++ code. Let me know if there are some other settings I need to change in the metro project files!


doctorj wrote at 2012-09-29 20:07:

Hi ,

 

I had downloaded the latest version so I took out the C++ reference and it worked , thank you , I have some other packaging issues to resolve but hope to submit to the windows store in the next couple of days Thanks again

 

Jerry


ibluesun wrote at 2012-10-05 01:01:

Hello

my app has been certified at last .. after failed attempt in privacy statement

here is the link

http://apps.microsoft.com/webpdp/en-US/app/equation-calculator/6863c777-8a38-476f-a717-b33857bbb926

 

it is a simple app for manipulating mathematical expressions (it also can derivate expressions) .. hope you like it :) :)

 

cheers :)

 


objo wrote at 2012-10-09 21:26:

That's cool! I see you need zoom/pan functionality in the control, I plan to add that later this autumn. Then you could remove the min/max sliders, and use the actual min/max of the x-axis instead.


ibluesun wrote at 2012-10-11 14:43:

this will be excellent.  I am happy that you liked the app.

I am planning also to add parametric functions for drawing 2D ..

a lot of ideas .. and your update will definitely be an added value :)

 

 

Change HitTest to public

Oystein Bjorke 10 years ago 0
This discussion was imported from CodePlex

sharethl wrote at 2014-03-28 00:00:

Hi, Objo, Can you change HitTest in UIPlotElement from protected to public?

This way will made it possible to add mouse tool. like: annotation delete tool, re-size tool, etc..
see DeleteAnnotationMouseTool's OnMouseDown event.

What do you think?
// attach even in chrome, which extends plotmodel.
this.MouseDown += OnMouseDown;
this.MouseMove += OnMouseMove;
this.MouseUp += OnMouseUp;
public MouseTool MouseTool{get;set;} // moues tool property.

//-------------------------------------------
// inside the chrome. and this mouse tool can be any tool people create.
private void OnMouseDown(object sender, OxyMouseDownEventArgs e) {
            if (_mouseTool != null) {
                _mouseTool.OnMouseDown(this, e);
            }
        }

//--------------------------------------------
// example of delete mouse tool, click an annotation, remove it from annotations collection.

public class DeleteAnnotationMouseTool : MouseTool {
     public override void OnMouseDown(ChromeModel chrome, OxyMouseDownEventArgs e) {
        HitTestResult hitResult;
        ScreenPoint screenPoint = e.Position;
        
        foreach (Annotation a in chrome.Annotations) {
            // here needs HitTest. 
            hitResult = a.HitTest(screenPoint, HIT_TEST_TOLERANCE);
            if (hitResult != null) {
                // add to collection for later to delete.
                break;
            }
        }
        // delete annotation.
    }
}

objo wrote at 2014-03-28 15:36:

I agree on this. Done!
Note: I renamed the virtual method to HitTestOverride (following naming pattern from FrameworkElement.ArrangeOverride at MSDN)

sharethl wrote at 2014-03-28 16:18:

I hope I could push the mouse tool to source code that could help people.
But will mouse tool duplicate Manipulator? or duplicate "HandleMouseDown" in "PlotModel".

The idea will be like the following code, start from the 3rd line.
Will this be ok and compatible?
if so, I am going to fork it out and submit with different built-in mouse tools.

PS: change HitTest to public will let people to create their own mouse tool.
Public MouseTool MouseTool{get;set;} // include this property in PlotModel.
 public void HandleMouseDown(object sender, OxyMouseDownEventArgs e)
        {
            // handle mouse tool first.
            // pass plotmodel instead of plotControl. so mouse tool could modify annotations collection or other plotmodel's properties.
            if (mouseTool!=null){
               mouseTool.OnMouseDown(this, e)); 
               if(e.handled) return;
            }
            
            // Revert the order to handle the top-level elements first
            foreach (var element in this.GetElements().Reverse())
            {
                var uiElement = element as UIPlotElement;
                if (uiElement == null)
                {
                    continue;
                }

                var result = uiElement.HitTest(e.Position, MouseHitTolerance);
                if (result != null)
                {
                    e.HitTestResult = result;
                    uiElement.OnMouseDown(sender, e);
                    if (e.Handled)
                    {
                        this.currentMouseEventElement = uiElement;
                    }
                }

                if (e.Handled)
                {
                    break;
                }
            }

            if (!e.Handled)
            {
                this.OnMouseDown(sender, e);
            }
        }

XAML why <oxy:PieSeries does not exist?

Oystein Bjorke 10 years ago 0
This discussion was imported from CodePlex

Auriou wrote at 2014-05-22 16:19:

XAML why <oxy:PieSeries does not exist ?

like this <oxy:ColumnSeries ?

objo wrote at 2014-05-23 08:15:

Right, the PieSeries wrapper is not yet implemented. This is
https://oxyplot.codeplex.com/workitem/9999

Auriou wrote at 2014-05-24 14:04:

Thank you.

Availability for the Windows 8 Phone

Oystein Bjorke 10 years ago 0
This discussion was imported from CodePlex

drj1000 wrote at 2013-01-22 17:49:

Hi,

 

Is Oxyplot available to use for Windows 8 Phone?

 

I use it on the Windows Desktop and it is great.

 

DRJ


objo wrote at 2013-01-22 18:06:

I have not tried building for Windows 8 Phone, but I guess it is not very difficult to get it to work. See the Silverlight and Windows Store app (Metro) versions!

Under review

Checkable legend

Oystein Bjorke 10 years ago updated by anonymous 10 years ago 4
This discussion was imported from CodePlex

luckymichael wrote at 2012-08-20 20:03:

is it possible to add checkbox in front of the legend items to change the IsVisible property?

 

Thanks


objo wrote at 2012-08-21 12:59:

Sorry, this is currently not possible. (this will require checkbox and binding functionality in the IRenderingContext)

I think this should be solved by the client application - if you use WPF/SL it should be possible to overlay the legend box over the plot control, and bind the checkboxes to the PlotModel.


pdinnissen wrote at 2012-12-07 18:17:

Hi luckymichael,

Have you had any luck performing this?

Thanks,

Pierre


wolf9s wrote at 2014-07-26 05:03:

objo wrote:
Sorry, this is currently not possible. (this will require checkbox and binding functionality in the IRenderingContext) I think this should be solved by the client application - if you use WPF/SL it should be possible to overlay the legend box over the plot control, and bind the checkboxes to the PlotModel.
First, I use WPF:
How solved the problem in the client application ?
How overlay ?
How bind checkboxes to the PlotModel?

Slxe wrote at 2014-07-27 05:45:

The legend in OxyPlot is pretty basic. If you want to do something like this you'll have to dynamically add checkboxes (and CheckChanged events) to a flow layout, I do it in an in-house app by using the same tag on the checkbox as the tag on the series. Then with an OnCheckChanged event I just pull out the series by the tag and set its visibility to the state of the checkbox. I can show some code when I get back into work on Monday if you need some more help.

wolf9s wrote at 2014-07-28 04:52:

First, let me thank you for your response.
Yes , I need you more help, need sample code.

Slxe wrote at 2014-07-28 18:06:

Well the most basic thing you can do (assuming you want to display Series and Axes) is create a SplitContainer, with each Panel inside being a FlowLayoutPanel. Then as you add Series and Axes to the PlotModel, also add a CheckBox to the corresponding FlowLayoutPanel. You can use FlowLayoutPanel.SetFlowBreak(Control, true) to force each CheckBox to be on it's own line in the Panel. Make sure that each CheckBox has the same Tag as the Series or Axes it corresponds to, then just hook up a CheckChanged event that sets the Series.IsVisible or Axes.IsAxisVisible to whatever the CheckBox.Checked state is.

DJDAS wrote at 2014-08-07 12:28:

Hi,
I found a solution that matched quite well my needs some time ago, following there is a simplified extract of my XAML code; essentially there is a graph and a stack panel with the checkboxes used as legend, all the "magic" is done by XAML binding, unfortunately I was not able to customize the bindings to the checkbox name to avoid repeating the code in the style of each series so I had to copy/paste the Style Triggers (I have about 25 series for one graph and 10 for another graph in the same page).
The properties bound to get data are List<DataPoint> for the Line and StairStep Series, while I created a new struct "AreaDataPoint" which is basically an extension of the DataPoint one with a "Y2" property to have the second values for the Y axys so in that case I have a List<AreaDataPoint> for the AreaSeries source items.
In the example you can also find a trick I used to hide all the AreaSeries with just one checkbox giving them different style colors, hope it will be useful :)
Disclaimer: I copied/pasted pieces of my code renaming all the styles, properties and so on because of NDA agreements so I'm not sure this code compiles, please use it as a sample idea not as a working solution (i.e. plot and axes styles are not included because they're simply dimensions and colors).
<Style x:Key="cbSeriesCheckboxes" TargetType="{x:Type CheckBox}" >
    <Setter Property="MinHeight" Value="16" />
    <Setter Property="IsEnabled" Value="True" />
</Style>

<Style x:Key="AreaSeriesSampleStyle" TargetType="{x:Type oxy:AreaSeries}">
    <Setter Property="LineStyle" Value="Solid" />
    <Setter Property="StrokeThickness" Value="1" />
    <Setter Property="DataFieldY2" Value="Y2" />
    <Setter Property="DataFieldX2" Value="X" />
    <Setter Property="Visibility" Value="Collapsed" />
    <Setter Property="Title" Value="{Binding ElementName=cbAreaSeriesSample, Path=Content}" />
    <Style.Triggers>
        <MultiDataTrigger>
            <MultiDataTrigger.Conditions>
                <Condition Binding="{Binding ElementName=cbAreaSeriesSample, Path=IsChecked}" Value="True"/>
                <Condition Binding="{Binding ElementName=cbAreaSeriesSample, Path=IsVisible}" Value="True"/>
            </MultiDataTrigger.Conditions>
            <Setter Property="Visibility" Value="Visible" />
        </MultiDataTrigger>
    </Style.Triggers>
    <Style.Triggers>
        <Trigger Property="Tag" Value="0">
            <Setter Property="Fill" Value="#4490EE90" />
            <Setter Property="Color" Value="LightGreen" />
        </Trigger>
        <Trigger Property="Tag" Value="1">
            <Setter Property="Fill" Value="#44FFD700" />
            <Setter Property="Color" Value="Gold" />
        </Trigger>
        <Trigger Property="Tag" Value="2">
            <Setter Property="Fill" Value="#44FFA500" />
            <Setter Property="Color" Value="Orange" />
        </Trigger>
        <Trigger Property="Tag" Value="3">
            <Setter Property="Fill" Value="#445F9EA0" />
            <Setter Property="Color" Value="CadetBlue" />
        </Trigger>
    </Style.Triggers>
</Style>
<Style x:Key="cbAreaSeriesSample" TargetType="{x:Type CheckBox}" BasedOn="{StaticResource cbSeriesCheckboxes}">
    <Setter Property="Foreground" Value="Green" />
    <Setter Property="Background" Value="WhiteSmoke" />
</Style>

<Style x:Key="StepSeriesSampleStyle" TargetType="{x:Type my:StairStepSeries}">
    <Setter Property="Color" Value="Blue" />
    <Setter Property="Title" Value="{Binding ElementName=cbStepSeriesSample, Path=Content}" />
    <Style.Triggers>
        <MultiDataTrigger>
            <MultiDataTrigger.Conditions>
                <Condition Binding="{Binding ElementName=cbStepSeriesSample, Path=IsChecked}" Value="True"/>
                <Condition Binding="{Binding ElementName=cbStepSeriesSample, Path=IsVisible}" Value="True"/>
            </MultiDataTrigger.Conditions>
            <Setter Property="Visibility" Value="Visible" />
        </MultiDataTrigger>
    </Style.Triggers>
</Style>
<Style x:Key="cbStepSeriesSample" TargetType="{x:Type CheckBox}" BasedOn="{StaticResource cbSeriesCheckboxes}">
    <Setter Property="Foreground" Value="Blue" />
    <Setter Property="Background" Value="WhiteSmoke" />
</Style>

<Style x:Key="LineSeriesSampleStyle" TargetType="{x:Type oxy:LineSeries}" >
    <Setter Property="LineStyle" Value="Solid" />
    <Setter Property="StrokeThickness" Value="3" />
    <Setter Property="Visibility" Value="Collapsed" />
    <Setter Property="CanTrackerInterpolatePoints" Value="False" />
    <Setter Property="Color" Value="Brown" />
    <Setter Property="Title" Value="{Binding ElementName=cbLineSeriesSample, Path=Content}" />
    <Style.Triggers>
        <MultiDataTrigger>
            <MultiDataTrigger.Conditions>
                <Condition Binding="{Binding ElementName=cbLineSeriesSample, Path=IsChecked}" Value="True"/>
                <Condition Binding="{Binding ElementName=cbLineSeriesSample, Path=IsVisible}" Value="True"/>
            </MultiDataTrigger.Conditions>
            <Setter Property="Visibility" Value="Visible" />
        </MultiDataTrigger>
    </Style.Triggers>
</Style>
<Style x:Key="cbLineSeriesSample" TargetType="{x:Type CheckBox}" BasedOn="{StaticResource cbSeriesCheckboxes}">
    <Setter Property="Foreground" Value="Brown" />
    <Setter Property="Background" Value="WhiteSmoke" />
</Style>




<StackPanel x:Name="Graphs" Orientation="Vertical">
    <oxy:Plot x:Name="TopPlot" Style="{StaticResource Plot}" MinHeight="380" Height="400" >
        <oxy:Plot.Axes>
            <oxy:DateTimeAxis Style="{StaticResource DateTimeAxis}"/>
            <oxy:LinearAxis Style="{StaticResource LinearAxis}"/> 
        </oxy:Plot.Axes>
        <oxy:AreaSeries Style="{StaticResource AreaSeriesSampleStyle}" ItemsSource="{Binding AreaSeriesData0}" Tag="0"/>
        <oxy:AreaSeries Style="{StaticResource AreaSeriesSampleStyle}" ItemsSource="{Binding AreaSeriesData1}" Tag="1"/>
        <oxy:AreaSeries Style="{StaticResource AreaSeriesSampleStyle}" ItemsSource="{Binding AreaSeriesData2}" Tag="2"/>
        <oxy:AreaSeries Style="{StaticResource AreaSeriesSampleStyle}" ItemsSource="{Binding AreaSeriesData3}" Tag="3"/>
        <my:StairStepSeries Style="{StaticResource StepSeriesSampleStyle}" ItemsSource="{Binding StepSeriesSampleData}"/>
        <oxy:LineSeries Style="{StaticResource LineSeriesSampleStyle}" ItemsSource="{Binding LineSeriesSampleData}"/>
    </oxy:Plot>
</StackPanel>

<StackPanel>
    <CheckBox x:Name="cbAreaSeriesSample" Style="{StaticResource cbAreaSeriesSample}" Content="Area Series" />
    <CheckBox x:Name="cbStepSeriesSample" Style="{StaticResource cbStepSeriesSample}" Content="StairStep Series" IsChecked="True"/>
    <CheckBox x:Name="cbLineSeriesSample" Style="{StaticResource cbLineSeriesSample}" Content="Line Series" IsChecked="False"  />
</StackPanel>

Slxe wrote at 2014-08-07 15:31:

Just as a tip: surround your code in triple backticks ("``` C#" and "```") to make it all display as code instead of how it's showing up =P. Thanks for the code example!

DJDAS wrote at 2014-08-07 15:36:

GREAT! I couldn't find a way to display it better! :)
Many thanks!
Bye!

Slxe wrote at 2014-08-07 17:22:

I'll add an example of how I'm handling it for WinForms! Although keep in mind this is for LineSeries and LinearAxis only, it could probably easily be extended to handle more. Also I've been thinking of writing it to detect and add only newly added series and axis, but haven't had the time at work yet. An example of the result can be found on this post
/// <summary>
///     Refreshes the custom legend based on the axes and series in the PlotModel.
/// </summary>
private void UpdateCustomLegend()
{
    uiSeriesLegendLayout.Controls.Clear();
    uiAxesLegendLayout.Controls.Clear();

    foreach (LineSeries s in PlotModel.Series.OfType<LineSeries>().OrderBy(s => s.Title))
    {
        var seriesColorButton = new Button
        {
            AutoSize = true,
            BackColor = s.Color.ToColor(),
            FlatStyle = FlatStyle.Flat,
            Size = new Size(30, 15),
            Tag = s.Tag,
            UseVisualStyleBackColor = false
        };
        seriesColorButton.Click += (sender, args) =>
        {
            using (var d = new ColorDialog())
            {
                d.Color = s.Color.ToColor();
                if (d.ShowDialog() != DialogResult.OK)
                    return;

                s.Color = d.Color.ToOxyColor();
                ((Button) sender).BackColor = d.Color;
                PlotModel.InvalidatePlot(false);
            }
        };

        var seriesVisibilityCheckBox = new CheckBox
        {
            AutoSize = true,
            Checked = s.IsVisible,
            Tag = s.Tag,
            Text = s.Title
        };
        seriesVisibilityCheckBox.CheckedChanged += (sender, args) =>
        {
            s.IsVisible = ((CheckBox) sender).Checked;
            PlotModel.InvalidatePlot(false);
        };

        uiSeriesLegendLayout.Controls.Add(seriesColorButton);
        uiSeriesLegendLayout.Controls.Add(seriesVisibilityCheckBox);
        uiSeriesLegendLayout.SetFlowBreak(seriesVisibilityCheckBox, true);
    }

    var seriesSelectAllCheckBox = new CheckBox
    {
        AutoSize = true,
        Checked = true,
        Text = "Select All"
    };
    seriesSelectAllCheckBox.CheckedChanged += (sender, args) =>
    {
        foreach (CheckBox cb in uiSeriesLegendLayout.Controls.OfType<CheckBox>())
            cb.Checked = ((CheckBox) sender).Checked;
    };

    uiSeriesLegendLayout.Controls.Add(seriesSelectAllCheckBox);

    var hideLinkedSeriesCheckBox = new CheckBox
    {
        AutoSize = true,
        Checked = false,
        Text = "Hide Linked Series"
    };

    foreach (LinearAxis a in PlotModel.Axes.OfType<LinearAxis>())
    {
        var axisVisibilityCheckBox = new CheckBox
        {
            AutoSize = true,
            Checked = a.IsAxisVisible,
            Tag = a.Tag,
            Text = a.Title
        };
        axisVisibilityCheckBox.CheckedChanged += (sender, args) =>
        {
            a.IsAxisVisible = ((CheckBox) sender).Checked;
            PlotModel.InvalidatePlot(false);

            if (!hideLinkedSeriesCheckBox.Checked)
                return;

            foreach (
                LineSeries s in
                    PlotModel.Series.OfType<LineSeries>()
                             .Where(s => s.YAxisKey == a.Key || s.XAxisKey == a.Key))
            {
                s.IsVisible = a.IsAxisVisible;
                uiSeriesLegendLayout.Controls.OfType<CheckBox>()
                                    .Single(cb => cb.Tag == s.Tag)
                                    .Checked = s.IsVisible;
            }
        };

        uiAxesLegendLayout.Controls.Add(axisVisibilityCheckBox);
        uiAxesLegendLayout.SetFlowBreak(axisVisibilityCheckBox, true);
    }

    var axisSelectAllCheckBox = new CheckBox
    {
        AutoSize = true,
        Checked = true,
        Text = "Select All"
    };
    axisSelectAllCheckBox.CheckedChanged += (sender, args) =>
    {
        foreach (
            CheckBox cb in
                uiAxesLegendLayout.Controls.OfType<CheckBox>()
                                  .Where(cb => cb != hideLinkedSeriesCheckBox))
            cb.Checked = ((CheckBox) sender).Checked;
    };

    uiAxesLegendLayout.Controls.Add(axisSelectAllCheckBox);
    uiAxesLegendLayout.Controls.Add(hideLinkedSeriesCheckBox);
}

PDF Report Generation

Oystein Bjorke 10 years ago 0
This discussion was imported from CodePlex

hljensen wrote at 2013-01-14 08:46:

Hi.

I'm having difficulties in getting the report generation framework to work. I've tried following the example in the ExportDemo but cannot get it to work. I'm using OxyPlot NET40 2013.1.7.1.

When calling my method below, it does not generate the expected output (no report.pdf file) but a file for the model plot IS generated.

Am I missing something in my report structure or is there some initialization that should be performed before writing the report ?

Here is the code. 

	public static void GenerateReport()
	{
		try
		{
			var r = new Report();
			r.Title = "Test Report";
			
			r.AddHeader(1, "Sensor Data");
			var main = new ReportSection();
			r.AddParagraph("Pressure Data");
			
			PlotModel presModel = PlotTimedData(data[0], data[3], "Pressure [Bar]");
			main.AddPlot(presModel, "Pressure", 300, 200);

			r.Add(main);
			
			ReportStyle style = new ReportStyle();			
			PdfReportWriter w = new PdfReportWriter(@"c:\data\report.pdf");
			
			w.WriteReport(r, style);
		}
		catch (Exception e)
		{
			Console.WriteLine("Failed to create report: " + e.Message);
			Console.WriteLine(e.StackTrace);
		}
	}


objo wrote at 2013-01-22 09:40:

I think you need to call Close on the PdfReportWriter.

Or better, use a "using" block:

using (var w = new PdfReportWriter(@"c:\data\report.pdf")) w.WriteReport(r, style);

I see the API needs to be cleaned up a bit here, to avoid confusion.

I think I will change to something like the static syntax used in System.IO.File (http://msdn.microsoft.com/en-us/library/system.io.file.writealltext.aspx)

PdfReportWriter.Export(r, style, @"c:\data\report.pdf");

See http://oxyplot.codeplex.com/workitem/10023

0
Under review

Printing

Mike Vanderveer 10 years ago updated by anonymous 10 years ago 1
Hi
I'm having a little trouble printing. I use the static method
XpsExporter.Print(this.PlotModel, 800, 500);
which works but always pushes the plot to the top of the page so far that it cuts off about 5% of it. All I want to do is print my plot on paper. nothing fancy. 

Thanks in advance
0
Under review

Plotcontrol gone from PlotModel in latest version.

Maarten Thomassen 10 years ago updated 9 years ago 4
I've just updated my oxyplot nuget package (using silverlight) to version 2014.1.491.

I was using the PlotModel.PlotControl.ActualController.UnbindMouseWheel(); to unbind the mousewheel from oxyplot and assign aMouseWheel event to the control housing my oxyplot control. However, the PlotControl from PlotModel is gone now and i can't unbind the mousewheel from the plot which is now handeling the mousewheel and not passing it to the control housing the oxyplot control when i mousewheel over the oxyplot inside my own control thus not firing my custom OnMouseWheel event. I can't seem to find an alternative for this in the new version. Where did this functionality go?

Kind regards,
Maarten

(sidenote: oxyplot has a tendancy to just remove or change stuff suddenly over versions. You should really consider not doing this).

AltSketch Render

Oystein Bjorke 10 years ago 0
This discussion was imported from CodePlex

AltSoftLab wrote at 2013-10-14 19:03:

OxyPlot Render has been ported to AltSketch.

AltSketch OxyPlot Render

AltSketch OxyPlot Render

AltSketch OxyPlot Render

AltSketch OxyPlot Render

AltSketch OxyPlot Render

AltSketch OxyPlot Render

Brief info (for more interest):

AltSketch is a pure C# CLS compliant 100% managed, without unsafe blocks Software Vector Graphics Library. All core functionality collected in one small library AltSketch.dll for Microsoft .NET Framework or Mono (including Silverlight / Moonlight). It depends only on System, System.Data & System.Xml assemblies (.NET Framework 2.0). It contains ​AltNETType - a pure C# CLS compliant 100% managed, without unsafe blocks port of font rendering library Freetype. It is presented as a subsystem of AltSketch in Alt.NETType namespace. Also AltSketch contains AltNETImage - a subsystem of AltSketch & was designed to be a simple way to load / save a several image format file streams into a Alt.Sketch.Bitmap object. AltNETImage is written entirely in .NET C# code. It does not use any OS-depended or other interoperability code, and it does not use any unsafe code blocks.

AltSketch SDK includes many Integrations with wide variety GUI-s & frameworks:

Silverlight
Windows Forms (throw System.Drawing, OpenGL, DirectX, DirectDraw​)
WPF (throw System.Windows.Media, OpenGL, DirectX, DirectDraw)
GTK (throw Gtk.Image, OpenGL)
QT: Qyoto & Qt4Dotnet​ (throw Qt.Image, OpenGL)
wxWidgets (throw wxWidgets.Image)
OpenTK / AltOpenTK
Tao.OpenGl (with Tao.FreeGlut)
SdlDotNet / AltSdlDotNet
​Tao.Sdl
SlimDX

everytimer wrote at 2013-10-15 00:02:

Nice demo. Oxyplot is awesome.

AltSoftLab wrote at 2013-10-15 04:32:

everytimer wrote:
Nice demo. Oxyplot is awesome.
Yes, OxyPlot is the best plotting library we could find!

objo wrote at 2013-10-15 15:02:

Very cool! It would be great to see it running in OpenGL and QT! How is the performance compared with the native libraries?

AltSoftLab wrote at 2013-10-15 15:34:

objo wrote:
Very cool! It would be great to see it running in OpenGL and QT! How is the performance compared with the native libraries?
It can be run in OpenGL & Qt (just look at AltSketch SDK), but only just as Software generated bitmap. Hardware acceleration coming soon. We didn't make perfomance compare tests, but it normally works in real time - just look at SDK or Silverlight Demo

AltSoftLab wrote at 2014-07-26 16:01:

Hi again from AltSoftLab Team!

In about a year we got many new features in our AltSketch Graphics Library. First of all we get HW Render Backends in many Graphics Platforms and Mobile Platforms (Windows Phone, Android, iOS). Also all AltSketch Extensions are open sourced now. You are welcome!

Unity Game Engine
Windows Phone
Android
iOS
Silverlight / Moonlight
XNA / MonoGame
OGRE 3D Engine
Axiom 3D Engine
NeoAxis 3D Engine
Irrlicht 3D Engine
OpenTK / AltOpenTK
SdlDotNet / AltSdlDotNet
SharpDX
Windows Forms (throw System.Drawing, OpenGL, DirectX, DirectDraw)
WPF (throw System.Windows.Media, OpenGL, DirectX, DirectDraw)
GTK (throw Gtk.Image, OpenGL)
Qt: Qyoto & Qt4Dotnet​ (throw Qt.Image, OpenGL)
wxWidgets (throw wxWidgets.Image)

AltSketch Unity OxyPlot
Image

AltSketch Axiom OxyPlot
Image

AltSketch OGRE OxyPlot
Image

Johnny,
AltSoftLab Team

Polar plot with logarithmic magnitude axis

Oystein Bjorke 10 years ago 0
This discussion was imported from CodePlex

aec wrote at 2012-08-28 22:51:

Hi objo. Is it possible to have polar plots where the magnitude axis can be changed to logarithmic axes?


objo wrote at 2012-08-29 06:37:

I think we need to create a new LogarithmicMagnitudeAxis, derived from MagnitudeAxis.

I added the feature request at http://oxyplot.codeplex.com/workitem/9996

Remember to vote :)