Get the type of graph

Posted by: ricardo.aleixo on 10 June 2024, 3:48 pm EST

  • Posted 10 June 2024, 3:48 pm EST - Updated 10 June 2024, 3:53 pm EST

    Hi.

    How can i get the type of a Chart navigate in ‘workbook.sheets[0].shapes …’

    i can’t find a definition or enum of Chats.

    Here in this example i’ve two chats of different types, i’d know the types of it.

  • Posted 11 June 2024, 4:32 am EST - Updated 11 June 2024, 4:37 am EST

    Hi,

    The JSON is meant for SpreadJS internal use only can be used for with our other product like GCExcel. You could use the SpreadJS API to get the chart type.

    You could refer to the following code snippet to get the Chart Type:

    sheet.shapes.get(“Chart1”).getChartModel().ChartType

    Kindly refer to the following screenshot:

    The Chart Type follows the following Enumeration: https://developer.mescius.com/spreadjs/api/enums/GC.Spread.Sheets.Charts.ChartType

    Similarly, if at the backend, you want to get the Chart Type, you could use our product GCExcel to load the json created by the SpreadJS and use the API to get the chart type.

    Refer to the following demo on GCExcel: https://developer.mescius.com/document-solutions/dot-net-excel-api/demos/

    Let me know if you face any issues.

    Regards,

    Ankit

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels