PDF report related question
ambrein2 wrote at 2014-01-16 04:37:
I an new to OxyPlot and had a question regarding creating report. I checked some of the sample code and using that wrote my report generation code, the code creates PDF report file but there are two files created one is filename.pdf and other is filename_Plot1.pdf. Any idea why there are two pdf's created? I just want one report file. I am using following code to generate report from a PlotModel:
private void CreateReport(string fileName)
{
string ext = System.IO.Path.GetExtension(fileName);
ext = ext.ToLower();
var r = new Report();
r.Title = "Waveform Report";
var main = new ReportSection();
r.Add(main);
main.AddPlot(this.Model, string.Empty, this.Plot.ActualWidth, this.Plot.ActualHeight);
var reportStyle = new ReportStyle();
using (var w = new PdfReportWriter(fileName))
{
w.WriteReport(r, reportStyle);
}
}
Any help is appreciatedeverytimer wrote at 2014-01-16 23:02:
objo wrote at 2014-01-17 07:49:
Paragraph
by filename, not stream...Cannot Build Samples in VS2012
Destinaxe wrote at 2013-10-03 03:20:
I am trying to build one of the sample WPF applications in VS2012, .NET 4.5 and when I try to build it I get the following errors.
"The Tag Plot does not exist in the xml namespace"
I am also getting errors when trying to build the OxyPlot solutuion in the source folder as well.
Can someone help me with the steps to use these libraries? I am very confused at this point.
Has anyone else had any issue with this or am I doing something wrong? I downloaded the source code and I am trying o open one of the sample WPF projects, is there something more that I need to do?
Thanks!
TavisHall wrote at 2014-01-10 01:49:
I have had the very same problem. The error description I get is:
"The tag 'Plot' does not exist in XML namespace 'clr-namespace:OxyPlot.Wpf;assembly=OxyPlot.Wpf'
I can see the example correctly in the preview window, but am not able to build it because of this error. Any help would be greatly appreciated!
Thank you
Edit: Note that I am using VS2010 C# Express version.
objo wrote at 2014-01-10 09:30:
Standard Visual Studio should work, make sure you have the latest update installed.
Garreye wrote at 2014-01-31 17:40:
DateTimeAxis question
Gala wrote at 2014-07-02 15:06:
Gala wrote at 2014-07-03 12:11:
Slxe wrote at 2014-07-03 15:28:
PDF Report: Figures with no caption/Text
luisfrossi wrote at 2014-01-29 05:12:
Is it possible to remove the captions/Texts from PlotFigures on a PDF Report?
Regards,
Luis
everytimer wrote at 2014-01-29 19:08:
Report report = new Report();
var reportStyle = new ReportStyle();
reportStyle.FigureTextFormatString = "";
objo wrote at 2014-02-02 21:09:
Exporting multiple PlotModels into single pdf
farezv wrote at 2014-03-06 19:20:
Is there a way to export multiple PlotModels into a single pdf file? Or perhaps export multiple pngs for these PlotModels and then combine them into a pdf?
I've currently implemented multiple pdf and png exports but they all print individually and I would like to display a single pdf on the front end.
Thank you!
P.S. OxyPlot is incredible =D
objo wrote at 2014-03-06 20:49:
PlotModel.Render
should be changed to accept a rectangle instead of width&height. Then create a
PdfExporter.Export
overload that takes a destination rectangle. The alternative can be to set a transform on the pdf rendering context, but I think it is better to change the PlotModel.Render method. I have created
https://oxyplot.codeplex.com/workitem/10149How to calculate the screen length of two points?
buaashuai wrote at 2014-07-18 11:02:
My problem is like this. http://pan.baidu.com/s/1nt8yEwh
Slxe wrote at 2014-07-18 16:11:
xAxis.Transform(double x, double y, Axis yAxis);
Bitmap picture in background of Oxyplot Plots in vb.net
lparis77 wrote at 2014-03-02 11:07:
First of all, thank you a lot for the continous development of that amazing Library !
One feature I would like to implement in my application is to put bitmap picture (from a file)
in background of my graphes.
I know it is possible (I had a look at the examples) through annotations but I have difficulties
to do it in VB.net since there is mismatch between Images classes and OxyImage classes.
I'm looking to have a command such as
"Annotation.imageSource.FromFile(Path ...)" but I have difficulties to handle "Stream classes" as input to OxyImage.
I will appreciate if anyone has some example how to put external files as input to OxyImage.
Regards.
maddog56 wrote at 2014-03-03 02:25:
Dim m_AssInfo As System.Reflection.Assembly
m_AssInfo = System.Reflection.Assembly.GetExecutingAssembly
Dim ms As Stream = m_AssInfo.GetManifestResourceStream("Test4Tools.purple-top-white-bottom.png")
Dim image0 As OxyImage
image0 = New OxyImage(ms)
ms.Close()
Dim ianno As New ImageAnnotation
ianno.ImageSource = image0
ianno.Opacity = 0.2
ianno.X = New PlotLength(0.5, PlotLengthUnit.RelativeToPlotArea)
ianno.Y = New PlotLength(0.5, PlotLengthUnit.RelativeToPlotArea)
ianno.Width = New PlotLength(1, PlotLengthUnit.RelativeToPlotArea)
ianno.Height = New PlotLength(1, PlotLengthUnit.RelativeToPlotArea)
ianno.Layer = AnnotationLayer.BelowSeries
ianno.HorizontalAlignment = OxyPlot.HorizontalAlignment.Center
ianno.VerticalAlignment = VerticalAlignment.Middle
ianno.Interpolate = True
myModel.Annotations.Add(ianno)
lparis77 wrote at 2014-03-03 19:51:
Is the expander messing me up here?
WannaInfo wrote at 2014-05-23 12:58:
When my application Starts up I don't want a visible Chart as there's nothing that's been processed. I thought I can "hide" the Chart in an Expander - (simple minded, perhaps). The following code appears to break OxyPlot? I expect at Minimum to see the Title - but I end up not seeing anything. Without the Expander I do see the Chart with Title.
<StackPanel Grid.Row="0" Grid.Column="4" Orientation="Horizontal">
<Expander ExpandDirection="Right">
<oxy:Plot Grid.Row="0" Grid.Column="4" Title="Plot"
x:Name="ChartPlot" Title="Ein Grafik"
Model="{Binding PlotModel}">
</oxy:Plot>
</Expander>
</StackPanel>
What don't I understand about either the Expander or the OxyPlot control? Or perhaps there are "better practices" to hide Content until it's ready for viewing?
Thanks.
XKCD-style graphs
TobiasTPCS wrote at 2014-04-15 10:23:
How hard would it be to implement 'xkcd style' linestyles? I see no current 'style' setting I could enhance with such a styling.
for people that don't know what I mean: http://xkcdgraphs.com
These plots are very useful to show estimate data instead of hard, absolute data.
I'm curious for your insights :-)
Tnx,
Tobias
objo wrote at 2014-04-15 10:35:
See
http://jakevdp.github.io/blog/2012/10/07/xkcd-style-plots-in-matplotlib/
http://xkcdgraphs.com/xkcd.js
objo wrote at 2014-04-16 07:56:
Render
method of the
PlotModel
virtual. Now you can make an XKCD IRenderContext
decorator and use this in the overridden render method. This means all content of the plot model can be XKCD style! :-) If someone can write the rand_func (see link) in c#,
I can make the decorator! :)
http://nbviewer.ipython.org/gist/anonymous/3835181TobiasTPCS wrote at 2014-04-16 09:07:
objo wrote at 2014-04-16 23:26:
Tip: install the Humor-Sans.ttf font (easily found by google).
Mouse Event on TextAnnoation
raphay wrote at 2013-04-19 13:25:
I am using Mouse Event in WPF on different types of annotation, I have no problem to handle event on the LineAnnotations and ArrowAnnotations, but i don't succeed in handling event on TextAnnotation, the mouse down event is never called in my application. Is there a property to activate ?
Thank you for your answers.
objo wrote at 2013-04-19 15:07:
HitTest
implementation for the TextAnnotation
, try the latest version.
The implementation use a point-in-polygon test, it should be possible to improve performance by using a point-in-rectangle test (but this means rotation and alignment must be considered...)
Servicio de atención al cliente por UserEcho