Abbrevations in slides


#1

I would like to draw charts with series of 10M , 20M,30M values. because I would like to use abbreviations in the numbers.any possibilities ?


#2

@vimalvimal55,

I have observed your requirements and have not been able to completely understand that. Can you please share the requirements in the form of sample presentation that you want to achieve using Aspose.Slides and we will then investigate on our end.


#3

Thanks for reverting on this , Much helpful !

image.png (6.7 KB)
if you see this chart , This could be simplified with Ks and Ms (Kilos and Millions abbrevations), Can this be done ?


#4

@vimalvimal55,

Can you please share this in form of sample presentation. I like to inform that if it is possible in PowerPoint than it is possible in Aspose.Slides as well.


#5

I am looking for the result in presentation alone.


#6

Could you please show some hints ?


#7

@vimalvimal55,

Can you please try to use following sample code on your end. This will help you to achieve your requirements. Please share feedback with us if there is still an issue.

using (Presentation pres = new Presentation())
{
IChart chart = pres.Slides[0].Shapes.AddChart(ChartType.ClusteredColumn ,100, 100, 500, 400, false);
IChartDataWorkbook wb = chart.ChartData.ChartDataWorkbook;

            IChartSeries series1 = chart.Chart.ChartData.Series.Add(ChartType.ClusteredColumn);
            series1.Name.AsCells.Add(wb.GetCell(0,"B1", "Series 1 name"));

            series1.DataPoints.AddDataPointForBarSeries(wb.GetCell(0, "B2", 1000000000));

            IChartSeries series2 = chart.Chart.ChartData.Series.Add(ChartType.ClusteredColumn);
            series2.Name.AsCells.Add(wb.GetCell(0, "C1", "Series 2 name"));
            series2.DataPoints.AddDataPointForBarSeries(wb.GetCell(0, "C2", 500000000));

            chart.ChartData.Categories.Add(wb.GetCell(0, "A2", "Category name"));

            chart.Axes.VerticalAxis.MajorGridLinesFormat.Line.FillFormat.FillType = FillType.NoFill;
            chart.Axes.VerticalAxis.MinorGridLinesFormat.Line.FillFormat.FillType = FillType.NoFill;

            chart.Axes.HorizontalAxis.MajorGridLinesFormat.Line.FillFormat.FillType = FillType.NoFill;
            chart.Axes.HorizontalAxis.MinorGridLinesFormat.Line.FillFormat.FillType = FillType.NoFill;

            chart.Legend.Position = LegendPositionType.Bottom;

            pres.Save(pptxFileName, SaveFormat.Pptx);
        }

#8

will that covert 5000000 to some 50M ??? 100000 as 100M , , We have same kind of coding as well with us . No difference !


#9

@vimalvimal55,

Can you please share PowerPoint presentation which is full filling your requirements. If it is possible in PowerPoint than we can implement this using Aspose.Slides. If it is not possible with PowerPoint than it is not possible with Aspose.Slides as well.


#10

there is no powerpoint that I could create , because As I am unable to.
(sorry I dont know difference between aspose presentation and slide, I am thinking both are same )


#11

@vimalvimal55,

Can you please check following code on your end. This will help you to achieve your requirements.

chart.Axes.VerticalAxis.NumberFormat = “$#,” M";";
chart.Axes.VerticalAxis.IsNumberFormatLinkedToSource = false;


#12

worked ! thanks a lot !!


#13

@vimalvimal55,

You are very welcome.