This project has moved and is read-only. For the latest updates, please go here.

OpenOffice won't display graphs correctly!

Jul 31, 2012 at 4:58 PM

Hello,

I have begun to use EPPlus, and I definitley want to continue using it.

However, whenever I attempt to create a graph, it will not display the actual graphic inside the graph, only in OpenOffice.

Also, the position never works. It always shows up at the top left, and is in the way of everything.

All other data is shown correctly. Any idea's why this is happening?

public void GenerateAndAddPieChart(ExcelWorksheet inExcelWorksheet, string inRange1, string inRange2, string inTitle, int inPosRow, int inPosCol)
        {
            ExcelPieChart pieChart = (ExcelPieChart)inExcelWorksheet.Drawings.AddChart(inTitle, eChartType.Pie);
            pieChart.SetSize(400, 400);
            pieChart.SetPosition(inPosRow, inPosCol);

            pieChart.Title.Text = inTitle;
            pieChart.DataLabel.ShowCategory = true;
            pieChart.DataLabel.ShowPercent = true;
            pieChart.Style = eChartStyle.Style1;

            pieChart.Series.Add(inExcelWorksheet.Cells[inRange1], inExcelWorksheet.Cells[inRange2]);
        }

Jan 18, 2013 at 7:41 AM

Hi MintyAnt,

dunno abt the graphics not getting displayed properly but i can help you with the positioning of the graph.

The problem if u have used the wrong function for setting position. Rather the wrong overload.

try

pieChart.SetPosition(inPosRow,0, inPosCol,0);

Jan 18, 2013 at 7:43 AM
anirudhkkw wrote:

Hi MintyAnt,

dunno abt the graphics not getting displayed properly but i can help you with the positioning of the graph.

The problem if u have used the wrong function for setting position. Rather the wrong overload.

try

 

pieChart.SetPosition(inPosRow,0, inPosCol,0);

 

oh try 

pieChart.Series.Add(inRange1, inRange2);