Line.WeightPx does not take 2.0 as a value

Hi,


This is a very weird one, maybe I am doing something wrong or not understanding something.

I have a chart with a series. When I set the Border property’s WeightPx to 2.0, it is actually set to 3.0. In the same vain, if I have it set to 3.0 and I do WeightPx–, it stays at 3.0.

If I set WeightPt to 1.5, WeightPx is correctly set to 2.0.

Is there a reason for it not accepting 2.0 as a value?

I am using 8.3.0.0


Additionally, I was wondering what you recommend to use for copying the Line style (i.e. the Series’ Border object) from one series to another?

Best regards,

Hi,


Please provide us your template file and sample code (runnable) to reproduce the issue on our end, we will check it soon.

You may retrieve/ get the Series’ border line attributes values and set those values to other series’ border accordingly.

Thank you.

Sure, there’s not even the need for a template file:


public void Main()
{
var workbook = new Workbook();

Worksheet worksheet = workbook.Worksheets[workbook.Worksheets.Add()];

Range range = worksheet.Cells.CreateRange(1, 1, 2, 5);

Chart chart = worksheet.Charts[worksheet.Charts.Add(ChartType.Line, 1, 1, 1, 1)];

var series = chart.NSeries[chart.NSeries.Add(range.RefersTo, true)];

Console.WriteLine(series.Border.WeightPx); // 0.0

series.Border.WeightPx = 2.0; // Set to 2.0

Console.WriteLine(series.Border.WeightPx); // 3.0

series.Border.WeightPx–; // Substract 1

Console.WriteLine(series.Border.WeightPx); // 3.0
}

Hi,


Thanks for the sample code.

After an initial test, I found the issue, the Line.WeightPx does not take 2.0 as a correct value. I used your code segment to produce the issue (I even tried to use Chart.calculate() method but to no avail):
e.g
Sample code:

var workbook = new Workbook();

Worksheet worksheet = workbook.Worksheets[workbook.Worksheets.Add()];

Range range = worksheet.Cells.CreateRange(1, 1, 2, 5);

Chart chart = worksheet.Charts[worksheet.Charts.Add(ChartType.Line, 1, 1, 1, 1)];

var series = chart.NSeries[chart.NSeries.Add(range.RefersTo, true)];

Console.WriteLine(series.Border.WeightPx); // 0.0

series.Border.WeightPx = 2.0; // Set to 2.0

chart.Calculate();

Console.WriteLine(series.Border.WeightPx); // 3.0

series.Border.WeightPx–; // Substract 1

Console.WriteLine(series.Border.WeightPx); // 3.0

I have logged a ticket with an id “CELLSNET-43170” for your issue. We will look into it soon.

Once we have any update on it, we will let you know here.

Thank you.

Hi,

Thanks for your using Aspose.Cells.

Please download and try the latest fix: Aspose.Cells for .NET v8.3.0.1 and let us know your feedback.

Hi,


Thanks for the updated dll.

I am not sure why, but this dll does not seem to contain definitions for the FindAll method on HyperlinkCollection. Furthermore I can no longer rely on Worksheetcollection to be castable to an IEnumerable as I was able to in v8.3.0.0.

I am usually using the .net 3.0 version though so maybe that is why?

The bug mentioned in this post seems to be fixed though, thanks!

Best regards,

Hi,

Thanks for your feedback and using Aspose.Cells.

This is actually a minor version that is meant to be used with .NET Framework 2.0, 3.0, 3.5, 4.0, 4.5 and Mono. In the major version we provide another .NET 3.5 dll that can be used with .NET Framework 3.5 , 4.0 and 4.5. This is actually the dll needed by you.

We are afraid, you will have to wait till we publish a major release which will contain your required dll and this fix too. You will have to wait till around 15th December because we will publish major release 8.3.1 in this time span. Please note, we provide major release containing all sorts of Aspose.Cells dlls once in every month.

The issues you have found earlier (filed as CELLSNET-43170) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.