Hello,
I purchased and installed the latest version of Aspose cells for .net.
In my visual studio solution, I removed the old DLL of Aspose.Cells. With the new DLL, I compile with errors.
'Aspose.Cells.Charts.ChartArea' does not contain a definition for 'AxisX' and no extension method 'AxisX' accepting a first argument of type 'Aspose.Cells.Charts.ChartArea' could be found (are you missing a using directive or an assembly reference?)
How to know where these properties/methods have been moved ...?
ps : Also the same error with chart.ChartArea.LegendBox.IsVisible or chart.GetChartImage ();
Thanks for your support
Code sample (pink error)
Axis AxisX = chart.ChartArea.AxisX;
Axis AxisY = chart.ChartArea.AxisY;
//On personnalise les axes
CustomizeAxes(chart.ChartArea.AxisX, chart.ChartArea.AxisY);
//On ajoute des valeurs aux axes
AddLabels(chart.ChartArea.AxisX, chart.ChartArea.AxisY);
//On masque la légende
chart.ChartArea.LegendBox.IsVisible = false;
//On supprime les marges du graphique
chart.ChartArea.Margin = 1;
//On récupère l'objet image généré
System.Drawing.Bitmap salesByCategoryImage = chart.GetChartImage();
Hi,
Thanks for providing us some details and sample code.
Were you using Aspose.Chart component or Aspose.Report previously. Well, I am afraid, Aspose.Chart was an independent .NET component used to create charts and render charts to image files. The charts rendered by the component were a kind of sophisticated charts opposite to MS Excel charts. This component does not create native MS Excel charts by any means. Looking at your sample code a bit, e.g chart.GetChartImage and other lines of code, which I think might be a part of Aspose.Chart component. This component was later merged with Aspose.Report component but I am afraid, Aspose.Report has also been discontinued now.
For your information, Aspose.Cells is a separate API that is used to create, manage, convert and render MS Excel file formats (e.g XLS, XLSX, XLSM, XLSB, CSV, Tab Delimited, ODS, SpreadsheetML (.xml), etc.), It supports almost all the features of MS Excel, including creating and manipulating MS Excel charts (standards and advanced types are supported). It also supports to render images for the charts. Aspose.Cells has its own and separate APIs set to implement different MS Excel (97-2010/2013) features and creating/rendering charts. I recommend you to kindly see the API Reference pages of Aspose.Cells APIs and see the following documents/articles on how to create different types of charts and render chart to image for your complete reference:
Let us know if you still have any issue or confusion.
Thank you.
Thanks for your answer.
After some research I found objects.
However, the online documentation always seems to be the last, is it correct ?
No traces AxisLabels object or property as IsDataPointNameVisible.
Can you tell me by what it was replaced ?
for (int i = 1; (i < AxisX.AxisLabels.Count) && (i < 4); i++)
{
}
axisY.AxisLabels.IsDataPointNameVisible = true;
Thanks
Hi,
Well, you did not tell us which older Aspose component you are using? By the way, Aspose.Cells for .NET and Aspose.Chart(obsoleted) are two different components with diverse architectures and APIs set, so you just cannot compare or parse objects for one component and vice versa. I think you have to learn the Aspose.Cells APIs that are used to create or manipulate MS Excel charts. For example, we have DataLabels class in Aspose.Cells APIs. Similarly we have SeriesCollection and Series classes in the Aspose.Cells APIs set. We recommend you to kindly do browse API Reference docs of Aspose.Cells and download examples especially regarding Charts from github repository here:
https://github.com/aspose-cells/Aspose.Cells-for-.NET/tree/master/Examples/Data/Charts
Also, see the sample code segment for your reference a bit:
e.g
Sample code:
…
//Get the first series data points.
ChartPointCollection datapoints = chart.NSeries[0].Points;
for (int i = 0; i < datapoints.Count; i++)
{
datapoints[i].DataLabels.ShowValue = true;
}
…
Let us know if we can be of any further help.
Thank you.
I use Aspose.Chart 3.4.8.2 and Aspose.Cells 4.7.1.0
I have many line of code. I do not want to rewrite the programs. That's why I'm trying to migrate.
I appreciate your response and I will analyze more Aspose.Cells.
Hi,
We recommend you to upgrade to our latest APIs set of Aspose.Cells for .NET which is more robust and feature rich APIs. Also we only maintain our online Wiki Conf. Docs based on current APIs, so you cannot have older docs for your older Aspose.Cells for .NET v4.7.1.
If you still want to stick with your older version v4.7.1 which is also limited in terms of features and performance, I am afraid, we might not figure out all the possible issues found in your older version(s). We only evaluate/fix issues based on latest APIs set. Anyways, best of luck with your migration process, hopefully you will accomplish your desired tasks.
Should you have any further queries, we will be happy to assist you soon.
Thank you.