I have created a chart use aspose.cell, and then show it on the webpage. But, the legend algin left (not center of chart). I have tried the setting: Legend.X= 500, however, it does not change anything.(please see the shotcut of my chart in attachment)
could you share me some idear so that I can move the legend to center of chart?
If you still find the issue, kindly do create a sample console application (runnable), zip it and post it here to show the issue on our end. Also provide the template Excel and other files here, we will check your issue soon.
I have followed with your guide(update to the newest v7.4.3 and try chart.Calculate()), but the issue still remained.
I have attached a simple project which can show my problem. Can you help check this issue?
BTW, I don't include the 'Aspose.Cells.dll' in demo, because the size is limited. so, please add it when you run the project(add to 'AsposeDell' folder ).
After an initial test, I can observe the issue by simply converting the chart (in the template file) to image file. The chart's legend is not aligned center/properly at the bottom in the output image as per the original chart.
Sample code: Dim workbook As Workbook = New Workbook("e:\test2\demo.xlsx") Dim sheet As Worksheet = workbook.Worksheets(1) Dim chart As Chart = sheet.Charts(0) chart.ToImage("e:\test2\mydemochart.png", ImageFormat.Png)
I have logged a ticket with an id "CELLSNET-41632" for your issue. We will look into your issue to figure it out soon.
I am afraid, your issue (“CELLSNET-41632”) is not resolved yet. I have asked the relevant developer to update on it or share an eta (if possible). Once we have any update on it, we will let you know here.
Well, I am afraid, you cannot check or access to our issue tracking system, it is internal and used to manage issues. You always, need to ask us to know the status of the issue.
To update you further, we will provide a new fix in the next week. Now you can modify some of your code segments of the project for setting the position of the legend.
We have updated the project you attached to this thread. Please check the method SetLegned in TC1.vb. If you run the program, right click on “Right Align of Plot Area” link in Default.aspx, the “way2” will run, The position of legend will be changed. You may set other value to layout the legend to anywhere you want.
Basing on your code, I still have the issue if I set the legend font size (TC1.vb Line 101) and change the serise name in different width, the legend ‘looks like’ in wrong postion, especially in case of horizontal center position.
I have downloaded the latest version, and it works fine. However, there is another issue, please see the attachment.
Attached image shows that the legend position is set horizontal center, but if we remove the legend border, the whole legend section seems to be ‘left aligned’, any idea about this issue?
Good to know that the latest fix v7.4.3.3 is working for you.
Regarding your issue i.e. “legend section seems to be left aligned…”, please give us a sample console application with v7.4.3.3, zip it and post it here, we will check your issue soon. Also attach your template files as well.
I have attached the sample application - in fact, it is the same as the application attached before, I just removed the legend border (TC1.vb Line 94-99).
After an initial test, I can see the issue with the image as you have pointed out. I have reopened your existing issue “CELLSNET-41632”. Our concerned developer will look into it soon.
Once we have any update on it, we will let you know here.
Well, we think it is ok. The legend is in center of the chart. It seems to be left as the text of third column legend item is too short. If you export the chart to excel file, and open it with Ms.Excel, you will find the legend in excel is not in center too. If you try to drag the legend to right in excel, the legend can’t be moved out of the chart right frame.
Also, you set the fill format of chart area to none. It will cause the text being blurry. We can’t not solve the problem because .Net framework is not good in drawing text in no background color image.
It is best set the format of chart area to automatic
Could you please provide sample Java code (runnable) with sample files (please zip template Excel file and other files prior attaching) and post us to show the issue on our end. We will check your issue soon.