Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Thu Oct 23, 2014 9:50 am

Hello E-iceblue team,

First of all, Congratulations on building such a robust code base for manipulating Excel sheets with which we can create excels without the usual Microsoft Excel Automation headache.

We are evaluating Spire.XLS for a business need we have where utilization reports excels with charts are created for our clients. We use Line with Markers chart for this purpose.

As we were evaluating we noticed that there is slight difference in the chart that is drawn manually when compared to the chart drawn dynamically through Spire.XLS DLL. Please find attached screenshot.

The chart drawn dynamically has flashy colors and the lines are thin which isn't visually very pleasing.

How can we achieve a chart as in Second chart (Office Excel LineMarker Chart with Style2 - Note there are thick lines in the plot area). Is there any workaround for the same? Are there any Style settings through which we can achieve the same?
If yes it would serve our purpose.

The code used are as below
Code: Select all
        Workbook myWorkbook = new Workbook();
        myWorkbook.LoadFromFile(filePath);
        Worksheet mySheet = myWorkbook.Worksheets[0];

        Chart myChart = mySheet.Charts.Add();
        myChart.ChartType = ExcelChartType.LineMarkers;
        myChart.DataRange = mySheet.Range["B4:N8"];
        myChart.Height = 220;
        myChart.Width = 750;
        myChart.Left = 30;
        myChart.Top = 220;
        myChart.PlotArea.Fill.Visible = false;
        myChart.Legend.Position = LegendPositionType.Right;
        myWorkbook.SaveToFile(newFilePath);


Please enlighten us in this regard.
Awaiting your response at the earliest.

Thanks in advance.

Best Regards,
Pavan Kumar
Attachments
SpireXLSChart.png
SpireXLSChart.png (66.75 KiB) Viewed 2889 times

Pavan
 
Posts: 3
Joined: Thu Oct 23, 2014 9:14 am

Fri Oct 24, 2014 2:40 am

Hello,

Thanks for evaluating our product.
If you save the result as 97to2003 Excel version, in which the chart lines will be thin, so please save it to 2007 version or above.
Code: Select all
myWorkbook.SaveToFile(newFilePath,ExcelVersion.Version2007);

If there are any questions, welcome to get it back to us.
Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Mon Oct 27, 2014 11:34 am

Hello Mr. Gary Zhang,

Thanks for your quick reply. I apologize for not responding soon after trying the solution you had provided as we were off for the festival.
Your solution works fine, but by saving the Chart with "ExcelVersion.Version2007", "Chart Title" is added by default.

Even though the ChartTitle is set to empty string it still appears as "Chart Title"
Code: Select all
chart.ChartTitle = "";

or
Code: Select all
chart.ChartTitle = string.Empty;


Is there any property to set ChartTitleArea Visibility to false? The reason is that we don't want chart titles on the chart.

Please reply back at your convenience. Thanks in advance.

Best Regards,
Pavan Kumar

Pavan
 
Posts: 3
Joined: Thu Oct 23, 2014 9:14 am

Tue Oct 28, 2014 6:04 am

Hello,

Thanks for your response.
Sorry that it is impossible to hide the default chart title at present, I have posted the issue to our Dev team, once there are any update, we will let you know.
Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Tue Oct 28, 2014 6:48 am

Hello Mr. Gary Zhang,

Thanks for your quick response. We look forward to it.

Once again great library for Excel Manipulation.

Best Regards,
Pavan Kumar

Pavan
 
Posts: 3
Joined: Thu Oct 23, 2014 9:14 am

Thu Oct 30, 2014 9:06 am

Hello,

The feature has been added, please download the newest hotfix and try the below method to remove the chart title.
http://www.e-iceblue.com/downloads/hot_ ... _7.6.9.zip
Code: Select all
myChart.ChartTitle = string.Empty;

If there are any questions, welcome to get it back to us.
Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Tue Nov 04, 2014 9:06 am

Hello,

Have you tried the newest hotfix? Has the issue been resolved? Could you please update the thread if convenience?

If there are any questions, welcome to get it back to us.
Thanks,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Return to Spire.XLS