الحصول على محور الفئة الثانية في المخطط – Aspose.Cells Cloud API تقوم هذه الواجهة REST باسترجاع محور الفئة الثانية في مخطط.
واجهة GetChartSecondCategoryAxis
GET https://api.aspose.cloud/v3.0/cells/{name}/worksheets/{sheetName}/charts/{chartIndex}/secondcategoryaxis
الأمان والمصادقة
تُعد واجهات Aspose.Cells Cloud آمنة وتتطلب مصادقة تعتمد على رمز JWT .
معلمات الطلب
اسم المعلمة
النوع
موقع المعلمة (path/query)
الوصف
name
string
path
اسم ملف Excel المخزن في السحابة.
sheetName
string
path
اسم ورقة العمل التي يحتوي المخطط عليها.
chartIndex
integer
path
المؤشر الصفري للفهرس للمخطط الذي يُطلب محوره.
folder
string
query
مسار المجلد في التخزين حيث يوجد الملف.
storageName
string
query
اسم تخزين Aspose Cloud المراد استخدامه (اختياري).
الاستجابة
{
"Code" : 200 ,
"Status" : "OK" ,
"Axis" : {
"Name" : "Second Category Axis" ,
"IsVisible" : true ,
"AxisLine" : { "Style" : "Solid" , "Weight" : 1 },
"TickMarks" : "Inside" ,
"Label" : {
"Font" : { "Size" : 10 , "Color" : "#000000" },
"Format" : "General"
}
}
}
رموز حالة HTTP
الرمز
المعنى
الوصف
200
OK
تمت تطبيق المرشح بنجاح؛ تحتوي الاستجابة على تفاصيل العملية.
400
Bad Request
معلمات مفقودة أو غير صالحة (مثل نوع ملف غير مدعوم).
401
Unauthorized
رمز JWT غير صالح أو مفقود.
413
Payload Too Large
حجم الملف المرفوع يتجاوز الحد المسموح.
500
Internal Server Error
خطأ غير متوقع في الخادم.
كيفية استخدام واجهة GetChartSecondCategoryAxis مع وحدات التطوير (SDKs)
مواصفات واجهة GetChartSecondCategoryAxis
يتم تعريف العملية Get-Chart-Second-Category-Axis في مواصفات OpenAPI ، وتتيح التفاعل المباشر عبر REST من متصفح الويب أو أي عميل HTTP.
يمكنك استخدام أداة سطر الأوامر cURL للوصول بسهولة إلى خدمات Aspose.Cells عبر الويب. يوضح المثال التالي كيفية استدعاء الواجهة باستخدام cURL.
استخدام وحدات تطوير Aspose.Cells Cloud (SDKs)
استخدام وحدات التطوير (SDKs) هو أسرع طريقة لدمج هذه الواجهة في مشروعك. فوحدات التطوير تتعامل مع التفاصيل منخفضة المستوى مثل المصادقة، وبناء الطلب، وتحليل الاستجابة، مما يسمح لك بالتركيز على المنطق التجاري. يمكنك الاطلاع على القائمة الكاملة لوحدات تطوير Aspose.Cells Cloud في مستودع GitHub .
توضح أمثلة الكود التالية كيفية استدعاء العملية Get Chart Second Category Axis باستخدام وحدات تطوير مختلفة:
C#
using Aspose.Cells.Cloud.SDK.Api ;
using Aspose.Cells.Cloud.SDK.Model.Requests ;
// تكوين عميل الواجهة
var config = new Configuration
{
ClientId = "<your-client-id>" ,
ClientSecret = "<your-client-secret>"
};
var apiInstance = new ChartsApi ( config );
// بناء الطلب
var request = new GetChartSecondCategoryAxisRequest (
name : "Sample.xlsx" ,
sheetName : "Sheet1" ,
chartIndex : 0 ,
folder : "Documents" ,
storageName : null
);
// التنفيذ
var response = apiInstance . GetChartSecondCategoryAxis ( request );
Console . WriteLine ( $"Axis Name: {response.Axis.Name}" );
Java
import com.aspose.cells.cloud.api.ChartsApi ;
import com.aspose.cells.cloud.model.* ;
import com.aspose.cells.cloud.model.requests.* ;
public class GetSecondCategoryAxis {
public static void main ( String [] args ) {
// تكوين عميل الواجهة
Configuration config = new Configuration ();
config . setClientId ( "<your-client-id>" );
config . setClientSecret ( "<your-client-secret>" );
ChartsApi api = new ChartsApi ( config );
// بناء الطلب
GetChartSecondCategoryAxisRequest request = new GetChartSecondCategoryAxisRequest (
"Sample.xlsx" , "Sheet1" , 0 , "Documents" , null );
// التنفيذ
AxisResponse response = api . getChartSecondCategoryAxis ( request );
System . out . println ( "Axis Name: " + response . getAxis (). getName ());
}
}
PHP
<? php
use Aspose\Cells\Cloud\Sdk\Api\ChartsApi ;
use Aspose\Cells\Cloud\Sdk\Configuration ;
use Aspose\Cells\Cloud\Sdk\Model\Requests\GetChartSecondCategoryAxisRequest ;
// التكوين
$config = new Configuration ();
$config -> setClientId ( '<your-client-id>' );
$config -> setClientSecret ( '<your-client-secret>' );
$apiInstance = new ChartsApi ( $config );
$request = new GetChartSecondCategoryAxisRequest (
'Sample.xlsx' , // name
'Sheet1' , // sheetName
0 , // chartIndex
'Documents' , // folder
null // storageName
);
try {
$result = $apiInstance -> getChartSecondCategoryAxis ( $request );
echo "Axis Name: " . $result -> getAxis () -> getName ();
} catch ( Exception $e ) {
echo 'Exception when calling ChartsApi->getChartSecondCategoryAxis: ' , $e -> getMessage (), PHP_EOL ;
}
?>
Ruby
require 'aspose_cells_cloud'
# تكوين وحدة التطوير
config = AsposeCellsCloud :: Configuration . new
config . client_id = '<your-client-id>'
config . client_secret = '<your-client-secret>'
api_instance = AsposeCellsCloud :: ChartsApi . new
begin
result = api_instance . get_chart_second_category_axis (
name : 'Sample.xlsx' ,
sheet_name : 'Sheet1' ,
chart_index : 0 ,
folder : 'Documents'
)
puts "Axis Name: #{ result . axis . name } "
rescue AsposeCellsCloud :: ApiError => e
puts "Exception when calling ChartsApi->get_chart_second_category_axis: #{ e } "
end
Python
import asposecellscloud
from asposecellscloud.rest import ApiException
from asposecellscloud.apis.charts_api import ChartsApi
from asposecellscloud.models import GetChartSecondCategoryAxisRequest
# تكوين عميل الواجهة
config = asposecellscloud . Configuration ()
config . client_id = '<your-client-id>'
config . client_secret = '<your-client-secret>'
api_instance = ChartsApi ( asposecellscloud . ApiClient ( config ))
request = GetChartSecondCategoryAxisRequest (
name = 'Sample.xlsx' ,
sheet_name = 'Sheet1' ,
chart_index = 0 ,
folder = 'Documents'
)
try :
response = api_instance . get_chart_second_category_axis ( request )
print ( 'Axis Name:' , response . axis . name )
except ApiException as e :
print ( 'Exception when calling ChartsApi->get_chart_second_category_axis:' , e )
Node.js
// مثال Node.js باستخدام وحدة Aspose.Cells Cloud SDK
const { ChartsApi , Configuration } = require ( 'asposecellscloud' );
const config = new Configuration ({
clientId : '<your-client-id>' ,
clientSecret : '<your-client-secret>'
});
const api = new ChartsApi ( config );
( async () => {
try {
const response = await api . getChartSecondCategoryAxis ({
name : 'Sample.xlsx' ,
sheetName : 'Sheet1' ,
chartIndex : 0 ,
folder : 'Documents'
});
console . log ( 'Axis Name:' , response . axis . name );
} catch ( error ) {
console . error ( 'Error:' , error );
}
})();
Android
// مثال Android (Java) باستخدام وحدة Aspose.Cells Cloud SDK لمنصة Android
import com.aspose.cells.cloud.sdk.api.ChartsApi ;
import com.aspose.cells.cloud.sdk.model.* ;
import com.aspose.cells.cloud.sdk.model.requests.* ;
public class GetSecondCategoryAxisAndroid {
public void execute () {
Configuration config = new Configuration ();
config . setClientId ( "<your-client-id>" );
config . setClientSecret ( "<your-client-secret>" );
ChartsApi api = new ChartsApi ( config );
GetChartSecondCategoryAxisRequest request = new GetChartSecondCategoryAxisRequest (
"Sample.xlsx" , "Sheet1" , 0 , "Documents" , null );
try {
AxisResponse response = api . getChartSecondCategoryAxis ( request );
System . out . println ( "Axis Name: " + response . getAxis (). getName ());
} catch ( Exception e ) {
e . printStackTrace ();
}
}
}
Swift
import AsposeCellsCloud
let config = Configuration ( clientId : "<your-client-id>" , clientSecret : "<your-client-secret>" )
let api = ChartsApi ( configuration : config )
let request = GetChartSecondCategoryAxisRequest (
name : "Sample.xlsx" ,
sheetName : "Sheet1" ,
chartIndex : 0 ,
folder : "Documents" ,
storageName : nil
)
api . getChartSecondCategoryAxis ( request : request ) { result , error in
if let axis = result ?. axis {
print ( "Axis Name: \( axis . name ?? "" ) " )
} else if let err = error {
print ( "Error: \( err ) " )
}
}
Perl
use Aspose::Cells::Cloud::Sdk::Api::ChartsApi ;
use Aspose::Cells::Cloud::Sdk::Configuration ;
my $config = Aspose::Cells::Cloud::Sdk::Configuration -> new (
client_id => '<your-client-id>' ,
client_secret => '<your-client-secret>'
);
my $api = Aspose::Cells::Cloud::Sdk::Api::ChartsApi -> new ( $config );
my $response = $api -> get_chart_second_category_axis (
name => 'Sample.xlsx' ,
sheet_name => 'Sheet1' ,
chart_index => 0 ,
folder => 'Documents'
);
print "Axis Name: " . $response -> axis -> name . "\n" ;
Go
package main
import (
"fmt"
"github.com/aspose-cells-cloud/aspose-cells-cloud-go/v3"
"github.com/aspose-cells-cloud/aspose-cells-cloud-go/v3/api"
)
func main () {
cfg := asposecellscloud . NewConfiguration ()
cfg . ClientId = "<your-client-id>"
cfg . ClientSecret = "<your-client-secret>"
apiInstance := api . NewChartsApi ( cfg )
request := asposecellscloud . GetChartSecondCategoryAxisRequest {
Name : "Sample.xlsx" ,
SheetName : "Sheet1" ,
ChartIndex : 0 ,
Folder : "Documents" ,
StorageName : nil ,
}
result , _ , err := apiInstance . GetChartSecondCategoryAxis ( request )
if err != nil {
fmt . Println ( "Error:" , err )
return
}
fmt . Println ( "Axis Name:" , result . Axis . Name )
}