Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1225
How to print a Graph UltraChart
posted

Hello, friends, I need two things:

1. How to set Label Axis (X and Y). I'm doing this and don't have good results.

 

 

 

 

 

 

 

 

Dim alX As New AxisSeriesLabelAppearance

alX.Format = AxisSeriesLabelFormat.Custom

alX.FormatString =

 

"Contenido Humedad %"

alX.Orientation = TextOrientation.Horizontal

alX.Visible =

 

True

UltraChart1.Axis.X.Labels.SeriesLabels = alX

 

 

Dim alY As New AxisSeriesLabelAppearance

alY.Format = AxisSeriesLabelFormat.Custom

alY.FormatString =

 

"Densidad Seca - Lbs/Ft Cúbico"

alY.Orientation = TextOrientation.VerticalLeftFacing

2.

 

I need to print my Graph in my printer, I've been looking for information and I don't found results, Please, any idea?

Thanks for all.

Regards.

Parents
No Data
Reply
  • 53790
    Suggested Answer
    posted

    Hello Eros,

    ErosDark said:
    I need to print my Graph in my printer

    Maybe one possible approach could be:

    ultraChart1.PrintChart();

    Also you could save yout chart in a file and than to print it. Here are few options:
    1. ultraChart1.SaveTo("..\\..\\Test_1.emf", System.Drawing.Imaging.ImageFormat.Emf);
    2. Image im;
       im = ultraChart1.Image;
       im.Save("..\\..\\Test_2.wmf", System.Drawing.Imaging.ImageFormat.Wmf);

    3. Report report = new Report();
       ISection section = report.AddSection();
       Infragistics.Documents.Graphics.Image chartImage = new Infragistics.Documents.Graphics.Image(ultraChart1.Image);
       Infragistics.Documents.Report.IImage reportImage = section.AddImage(chartImage);
       report.Publish(@"..\Debug\Test_1.pdf", FileFormat.PDF);

    ErosDark said:
    How to set Label Axis (X and Y). I'm doing this and don't have good results

    I`m not sure what is your scenario, but you need to have :

    AxisItem axis2 = new AxisItem();
    axis2.Extent = 70;
    axis2.DataType = AxisDataType.Numeric;
    axis2.Labels.ItemFormatString = "<DATA_VALUE:##.##>";
    axis2.OrientationType = AxisNumber.Y_Axis;
    axis2.LineColor = Color.Blue;
    area.Axes.Add(axis2);

    and also  code for the series:

    NumericSeries series2 = new NumericSeries();
    series2.Label = "Lab2";
    series2.Data.LabelColumn = "LabCol";
    series2.Data.ValueColumn = "Tuesday";
    series2.Data.DataSource = dt;
    series2.DataBind();
    series2.PEs.Add(new PaintElement(Color.Blue));
    myColumnLayer2.Series.Add(series2);
    ultraChart1.CompositeChart.Series.Add(series2);
     

    Please give us more details about your scenario or send us your sample. I`ll be glad to help you.
    Regards

Children
No Data