| 1 | =begin comment | ||
| 2 | |||
| 3 | Copyright (c) 2019 Aspose Pty Ltd | ||
| 4 | |||
| 5 | Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| 6 | of this software and associated documentation files (the "Software"), to deal | ||
| 7 | in the Software without restriction, including without limitation the rights | ||
| 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| 9 | copies of the Software, and to permit persons to whom the Software is | ||
| 10 | furnished to do so, subject to the following conditions: | ||
| 11 | |||
| 12 | The above copyright notice and this permission notice shall be included in all | ||
| 13 | copies or substantial portions of the Software. | ||
| 14 | |||
| 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| 21 | SOFTWARE. | ||
| 22 | |||
| 23 | =end comment | ||
| 24 | |||
| 25 | =cut | ||
| 26 | |||
| 27 | package AsposeSlidesCloud::Object::Axis; | ||
| 28 | |||
| 29 | require 5.6.0; | ||
| 30 | use strict; | ||
| 31 | use warnings; | ||
| 32 | use utf8; | ||
| 33 | use JSON qw(decode_json); | ||
| 34 | use Data::Dumper; | ||
| 35 | use Module::Runtime qw(use_module); | ||
| 36 | use Log::Any qw($log); | ||
| 37 | use Date::Parse; | ||
| 38 | use DateTime; | ||
| 39 | |||
| 40 | use AsposeSlidesCloud::Object::ChartLinesFormat; | ||
| 41 | use AsposeSlidesCloud::Object::ChartTitle; | ||
| 42 | use AsposeSlidesCloud::Object::EffectFormat; | ||
| 43 | use AsposeSlidesCloud::Object::FillFormat; | ||
| 44 | use AsposeSlidesCloud::Object::LineFormat; | ||
| 45 | |||
| 46 | use base ("Class::Accessor", "Class::Data::Inheritable"); | ||
| 47 | |||
| 48 | |||
| 49 | # | ||
| 50 | #Represents a chart axis | ||
| 51 | # | ||
| 52 | # NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. | ||
| 53 | # REF: https://github.com/swagger-api/swagger-codegen | ||
| 54 | # | ||
| 55 | |||
| 56 | # | ||
| 57 | # NOTE: This class is auto generated by the swagger code generator program. | ||
| 58 | # Do not edit the class manually. | ||
| 59 | # Ref: https://github.com/swagger-api/swagger-codegen | ||
| 60 | # | ||
| 61 | __PACKAGE__->mk_classdata('attribute_map' => {}); | ||
| 62 | __PACKAGE__->mk_classdata('swagger_types' => {}); | ||
| 63 | __PACKAGE__->mk_classdata('method_documentation' => {}); | ||
| 64 | __PACKAGE__->mk_classdata('class_documentation' => {}); | ||
| 65 | |||
| 66 | # new object | ||
| 67 | sub new { | ||
| 68 | my ($class, %args) = @_; | ||
| 69 | |||
| 70 | my $self = bless {}, $class; | ||
| 71 | |||
| 72 | foreach my $attribute (keys %{$class->attribute_map}) { | ||
| 73 | my $args_key = $class->attribute_map->{$attribute}; | ||
| 74 | $self->$attribute( $args{ $args_key } ); | ||
| 75 | } | ||
| 76 | return $self; | ||
| 77 | } | ||
| 78 | |||
| 79 | # used by JSON for serialization | ||
| 80 | sub TO_JSON { | ||
| 81 | my $self = shift; | ||
| 82 | my $_data = {}; | ||
| 83 | foreach my $_key (keys %{$self->attribute_map}) { | ||
| 84 | if (defined $self->{$_key}) { | ||
| 85 | $_data->{$self->attribute_map->{$_key}} = $self->{$_key}; | ||
| 86 | } | ||
| 87 | } | ||
| 88 | return $_data; | ||
| 89 | } | ||
| 90 | |||
| 91 | |||
| 92 | __PACKAGE__->class_documentation({description => 'Represents a chart axis', | ||
| 93 | class => 'Axis', | ||
| 94 | required => [], # TODO | ||
| 95 | } ); | ||
| 96 | |||
| 97 | __PACKAGE__->method_documentation({ | ||
| 98 | 'is_visible' => { | ||
| 99 | datatype => 'boolean', | ||
| 100 | base_name => 'IsVisible', | ||
| 101 | description => 'True if the axis is visible', | ||
| 102 | format => '', | ||
| 103 | read_only => '', | ||
| 104 | }, | ||
| 105 | 'has_title' => { | ||
| 106 | datatype => 'boolean', | ||
| 107 | base_name => 'HasTitle', | ||
| 108 | description => 'True if the axis has a visible title', | ||
| 109 | format => '', | ||
| 110 | read_only => '', | ||
| 111 | }, | ||
| 112 | 'title' => { | ||
| 113 | datatype => 'ChartTitle', | ||
| 114 | base_name => 'Title', | ||
| 115 | description => 'Axis title', | ||
| 116 | format => '', | ||
| 117 | read_only => '', | ||
| 118 | }, | ||
| 119 | 'position' => { | ||
| 120 | datatype => 'string', | ||
| 121 | base_name => 'Position', | ||
| 122 | description => 'Axis position', | ||
| 123 | format => '', | ||
| 124 | read_only => '', | ||
| 125 | }, | ||
| 126 | 'display_unit' => { | ||
| 127 | datatype => 'string', | ||
| 128 | base_name => 'DisplayUnit', | ||
| 129 | description => 'The scaling value of the display units for the value axis', | ||
| 130 | format => '', | ||
| 131 | read_only => '', | ||
| 132 | }, | ||
| 133 | 'base_unit_scale' => { | ||
| 134 | datatype => 'string', | ||
| 135 | base_name => 'BaseUnitScale', | ||
| 136 | description => 'The smallest time unit that is represented on the date axis', | ||
| 137 | format => '', | ||
| 138 | read_only => '', | ||
| 139 | }, | ||
| 140 | 'is_automatic_major_unit' => { | ||
| 141 | datatype => 'boolean', | ||
| 142 | base_name => 'IsAutomaticMajorUnit', | ||
| 143 | description => 'True the major unit of the axis is automatically assigned', | ||
| 144 | format => '', | ||
| 145 | read_only => '', | ||
| 146 | }, | ||
| 147 | 'major_unit' => { | ||
| 148 | datatype => 'double', | ||
| 149 | base_name => 'MajorUnit', | ||
| 150 | description => 'The major units for the date or value axis', | ||
| 151 | format => '', | ||
| 152 | read_only => '', | ||
| 153 | }, | ||
| 154 | 'major_unit_scale' => { | ||
| 155 | datatype => 'string', | ||
| 156 | base_name => 'MajorUnitScale', | ||
| 157 | description => 'The major unit scale for the date axis', | ||
| 158 | format => '', | ||
| 159 | read_only => '', | ||
| 160 | }, | ||
| 161 | 'major_tick_mark' => { | ||
| 162 | datatype => 'string', | ||
| 163 | base_name => 'MajorTickMark', | ||
| 164 | description => 'The type of major tick mark for the specified axis', | ||
| 165 | format => '', | ||
| 166 | read_only => '', | ||
| 167 | }, | ||
| 168 | 'is_automatic_minor_unit' => { | ||
| 169 | datatype => 'boolean', | ||
| 170 | base_name => 'IsAutomaticMinorUnit', | ||
| 171 | description => 'True the minor unit of the axis is automatically assigned', | ||
| 172 | format => '', | ||
| 173 | read_only => '', | ||
| 174 | }, | ||
| 175 | 'minor_unit' => { | ||
| 176 | datatype => 'double', | ||
| 177 | base_name => 'MinorUnit', | ||
| 178 | description => 'The minor units for the date or value axis', | ||
| 179 | format => '', | ||
| 180 | read_only => '', | ||
| 181 | }, | ||
| 182 | 'minor_unit_scale' => { | ||
| 183 | datatype => 'string', | ||
| 184 | base_name => 'MinorUnitScale', | ||
| 185 | description => 'The minor unit scale for the date axis', | ||
| 186 | format => '', | ||
| 187 | read_only => '', | ||
| 188 | }, | ||
| 189 | 'minor_tick_mark' => { | ||
| 190 | datatype => 'string', | ||
| 191 | base_name => 'MinorTickMark', | ||
| 192 | description => 'The type of minor tick mark for the specified axis', | ||
| 193 | format => '', | ||
| 194 | read_only => '', | ||
| 195 | }, | ||
| 196 | 'is_automatic_max_value' => { | ||
| 197 | datatype => 'boolean', | ||
| 198 | base_name => 'IsAutomaticMaxValue', | ||
| 199 | description => 'True if the max value is automatically assigned', | ||
| 200 | format => '', | ||
| 201 | read_only => '', | ||
| 202 | }, | ||
| 203 | 'max_value' => { | ||
| 204 | datatype => 'double', | ||
| 205 | base_name => 'MaxValue', | ||
| 206 | description => 'The maximum value on the value axis', | ||
| 207 | format => '', | ||
| 208 | read_only => '', | ||
| 209 | }, | ||
| 210 | 'is_automatic_min_value' => { | ||
| 211 | datatype => 'boolean', | ||
| 212 | base_name => 'IsAutomaticMinValue', | ||
| 213 | description => 'True if the min value is automatically assigned', | ||
| 214 | format => '', | ||
| 215 | read_only => '', | ||
| 216 | }, | ||
| 217 | 'min_value' => { | ||
| 218 | datatype => 'double', | ||
| 219 | base_name => 'MinValue', | ||
| 220 | description => 'The minimum value on the value axis', | ||
| 221 | format => '', | ||
| 222 | read_only => '', | ||
| 223 | }, | ||
| 224 | 'is_logarithmic' => { | ||
| 225 | datatype => 'boolean', | ||
| 226 | base_name => 'IsLogarithmic', | ||
| 227 | description => 'True if the value axis scale type is logarithmic', | ||
| 228 | format => '', | ||
| 229 | read_only => '', | ||
| 230 | }, | ||
| 231 | 'log_base' => { | ||
| 232 | datatype => 'double', | ||
| 233 | base_name => 'LogBase', | ||
| 234 | description => 'The logarithmic base. Default value is 10', | ||
| 235 | format => '', | ||
| 236 | read_only => '', | ||
| 237 | }, | ||
| 238 | 'category_axis_type' => { | ||
| 239 | datatype => 'string', | ||
| 240 | base_name => 'CategoryAxisType', | ||
| 241 | description => 'The type of the category axis', | ||
| 242 | format => '', | ||
| 243 | read_only => '', | ||
| 244 | }, | ||
| 245 | 'axis_between_categories' => { | ||
| 246 | datatype => 'boolean', | ||
| 247 | base_name => 'AxisBetweenCategories', | ||
| 248 | description => 'True if the value axis crosses the category axis between categories. This property applies only to category axes, and it doesn't apply to 3-D charts', | ||
| 249 | format => '', | ||
| 250 | read_only => '', | ||
| 251 | }, | ||
| 252 | 'label_offset' => { | ||
| 253 | datatype => 'int', | ||
| 254 | base_name => 'LabelOffset', | ||
| 255 | description => 'The distance of labels from the axis. Applied to category or date axis. Value must be between 0% and 1000%. ', | ||
| 256 | format => '', | ||
| 257 | read_only => '', | ||
| 258 | }, | ||
| 259 | 'is_plot_order_reversed' => { | ||
| 260 | datatype => 'boolean', | ||
| 261 | base_name => 'IsPlotOrderReversed', | ||
| 262 | description => 'True if MS PowerPoint plots data points from last to first', | ||
| 263 | format => '', | ||
| 264 | read_only => '', | ||
| 265 | }, | ||
| 266 | 'is_number_format_linked_to_source' => { | ||
| 267 | datatype => 'boolean', | ||
| 268 | base_name => 'IsNumberFormatLinkedToSource', | ||
| 269 | description => 'True if the format is linked to source data', | ||
| 270 | format => '', | ||
| 271 | read_only => '', | ||
| 272 | }, | ||
| 273 | 'number_format' => { | ||
| 274 | datatype => 'string', | ||
| 275 | base_name => 'NumberFormat', | ||
| 276 | description => 'the format string for the Axis Labels', | ||
| 277 | format => '', | ||
| 278 | read_only => '', | ||
| 279 | }, | ||
| 280 | 'cross_type' => { | ||
| 281 | datatype => 'string', | ||
| 282 | base_name => 'CrossType', | ||
| 283 | description => 'The CrossType on the specified axis where the other axis crosses', | ||
| 284 | format => '', | ||
| 285 | read_only => '', | ||
| 286 | }, | ||
| 287 | 'cross_at' => { | ||
| 288 | datatype => 'double', | ||
| 289 | base_name => 'CrossAt', | ||
| 290 | description => 'The point on the axis where the perpendicular axis crosses it', | ||
| 291 | format => '', | ||
| 292 | read_only => '', | ||
| 293 | }, | ||
| 294 | 'is_automatic_tick_marks_spacing' => { | ||
| 295 | datatype => 'boolean', | ||
| 296 | base_name => 'IsAutomaticTickMarksSpacing', | ||
| 297 | description => 'True for automatic tick marks spacing value', | ||
| 298 | format => '', | ||
| 299 | read_only => '', | ||
| 300 | }, | ||
| 301 | 'tick_marks_spacing' => { | ||
| 302 | datatype => 'int', | ||
| 303 | base_name => 'TickMarksSpacing', | ||
| 304 | description => 'Specifies how many tick marks shall be skipped before the next one shall be drawn. Applied to category or series axis.', | ||
| 305 | format => '', | ||
| 306 | read_only => '', | ||
| 307 | }, | ||
| 308 | 'is_automatic_tick_label_spacing' => { | ||
| 309 | datatype => 'boolean', | ||
| 310 | base_name => 'IsAutomaticTickLabelSpacing', | ||
| 311 | description => 'True for automatic tick label spacing value', | ||
| 312 | format => '', | ||
| 313 | read_only => '', | ||
| 314 | }, | ||
| 315 | 'tick_label_spacing' => { | ||
| 316 | datatype => 'int', | ||
| 317 | base_name => 'TickLabelSpacing', | ||
| 318 | description => 'Specifies how many tick labels to skip between label that is drawn.', | ||
| 319 | format => '', | ||
| 320 | read_only => '', | ||
| 321 | }, | ||
| 322 | 'tick_label_position' => { | ||
| 323 | datatype => 'string', | ||
| 324 | base_name => 'TickLabelPosition', | ||
| 325 | description => 'The position of tick-mark labels on the specified axis.', | ||
| 326 | format => '', | ||
| 327 | read_only => '', | ||
| 328 | }, | ||
| 329 | 'tick_label_rotation_angle' => { | ||
| 330 | datatype => 'double', | ||
| 331 | base_name => 'TickLabelRotationAngle', | ||
| 332 | description => 'Represents the rotation angle of tick labels.', | ||
| 333 | format => '', | ||
| 334 | read_only => '', | ||
| 335 | }, | ||
| 336 | 'fill_format' => { | ||
| 337 | datatype => 'FillFormat', | ||
| 338 | base_name => 'FillFormat', | ||
| 339 | description => 'Get or sets the fill format.', | ||
| 340 | format => '', | ||
| 341 | read_only => '', | ||
| 342 | }, | ||
| 343 | 'effect_format' => { | ||
| 344 | datatype => 'EffectFormat', | ||
| 345 | base_name => 'EffectFormat', | ||
| 346 | description => 'Get or sets the effect format.', | ||
| 347 | format => '', | ||
| 348 | read_only => '', | ||
| 349 | }, | ||
| 350 | 'line_format' => { | ||
| 351 | datatype => 'LineFormat', | ||
| 352 | base_name => 'LineFormat', | ||
| 353 | description => 'Get or sets the line format.', | ||
| 354 | format => '', | ||
| 355 | read_only => '', | ||
| 356 | }, | ||
| 357 | 'major_grid_lines_format' => { | ||
| 358 | datatype => 'ChartLinesFormat', | ||
| 359 | base_name => 'MajorGridLinesFormat', | ||
| 360 | description => 'Get or sets the format of major grid lines.', | ||
| 361 | format => '', | ||
| 362 | read_only => '', | ||
| 363 | }, | ||
| 364 | 'minor_grid_lines_format' => { | ||
| 365 | datatype => 'ChartLinesFormat', | ||
| 366 | base_name => 'MinorGridLinesFormat', | ||
| 367 | description => 'Get or sets the format of major grid lines.', | ||
| 368 | format => '', | ||
| 369 | read_only => '', | ||
| 370 | }, | ||
| 371 | }); | ||
| 372 | |||
| 373 | __PACKAGE__->swagger_types( { | ||
| 374 | 'is_visible' => 'boolean', | ||
| 375 | 'has_title' => 'boolean', | ||
| 376 | 'title' => 'ChartTitle', | ||
| 377 | 'position' => 'string', | ||
| 378 | 'display_unit' => 'string', | ||
| 379 | 'base_unit_scale' => 'string', | ||
| 380 | 'is_automatic_major_unit' => 'boolean', | ||
| 381 | 'major_unit' => 'double', | ||
| 382 | 'major_unit_scale' => 'string', | ||
| 383 | 'major_tick_mark' => 'string', | ||
| 384 | 'is_automatic_minor_unit' => 'boolean', | ||
| 385 | 'minor_unit' => 'double', | ||
| 386 | 'minor_unit_scale' => 'string', | ||
| 387 | 'minor_tick_mark' => 'string', | ||
| 388 | 'is_automatic_max_value' => 'boolean', | ||
| 389 | 'max_value' => 'double', | ||
| 390 | 'is_automatic_min_value' => 'boolean', | ||
| 391 | 'min_value' => 'double', | ||
| 392 | 'is_logarithmic' => 'boolean', | ||
| 393 | 'log_base' => 'double', | ||
| 394 | 'category_axis_type' => 'string', | ||
| 395 | 'axis_between_categories' => 'boolean', | ||
| 396 | 'label_offset' => 'int', | ||
| 397 | 'is_plot_order_reversed' => 'boolean', | ||
| 398 | 'is_number_format_linked_to_source' => 'boolean', | ||
| 399 | 'number_format' => 'string', | ||
| 400 | 'cross_type' => 'string', | ||
| 401 | 'cross_at' => 'double', | ||
| 402 | 'is_automatic_tick_marks_spacing' => 'boolean', | ||
| 403 | 'tick_marks_spacing' => 'int', | ||
| 404 | 'is_automatic_tick_label_spacing' => 'boolean', | ||
| 405 | 'tick_label_spacing' => 'int', | ||
| 406 | 'tick_label_position' => 'string', | ||
| 407 | 'tick_label_rotation_angle' => 'double', | ||
| 408 | 'fill_format' => 'FillFormat', | ||
| 409 | 'effect_format' => 'EffectFormat', | ||
| 410 | 'line_format' => 'LineFormat', | ||
| 411 | 'major_grid_lines_format' => 'ChartLinesFormat', | ||
| 412 | 'minor_grid_lines_format' => 'ChartLinesFormat' | ||
| 413 | } ); | ||
| 414 | |||
| 415 | __PACKAGE__->attribute_map( { | ||
| 416 | 'is_visible' => 'IsVisible', | ||
| 417 | 'has_title' => 'HasTitle', | ||
| 418 | 'title' => 'Title', | ||
| 419 | 'position' => 'Position', | ||
| 420 | 'display_unit' => 'DisplayUnit', | ||
| 421 | 'base_unit_scale' => 'BaseUnitScale', | ||
| 422 | 'is_automatic_major_unit' => 'IsAutomaticMajorUnit', | ||
| 423 | 'major_unit' => 'MajorUnit', | ||
| 424 | 'major_unit_scale' => 'MajorUnitScale', | ||
| 425 | 'major_tick_mark' => 'MajorTickMark', | ||
| 426 | 'is_automatic_minor_unit' => 'IsAutomaticMinorUnit', | ||
| 427 | 'minor_unit' => 'MinorUnit', | ||
| 428 | 'minor_unit_scale' => 'MinorUnitScale', | ||
| 429 | 'minor_tick_mark' => 'MinorTickMark', | ||
| 430 | 'is_automatic_max_value' => 'IsAutomaticMaxValue', | ||
| 431 | 'max_value' => 'MaxValue', | ||
| 432 | 'is_automatic_min_value' => 'IsAutomaticMinValue', | ||
| 433 | 'min_value' => 'MinValue', | ||
| 434 | 'is_logarithmic' => 'IsLogarithmic', | ||
| 435 | 'log_base' => 'LogBase', | ||
| 436 | 'category_axis_type' => 'CategoryAxisType', | ||
| 437 | 'axis_between_categories' => 'AxisBetweenCategories', | ||
| 438 | 'label_offset' => 'LabelOffset', | ||
| 439 | 'is_plot_order_reversed' => 'IsPlotOrderReversed', | ||
| 440 | 'is_number_format_linked_to_source' => 'IsNumberFormatLinkedToSource', | ||
| 441 | 'number_format' => 'NumberFormat', | ||
| 442 | 'cross_type' => 'CrossType', | ||
| 443 | 'cross_at' => 'CrossAt', | ||
| 444 | 'is_automatic_tick_marks_spacing' => 'IsAutomaticTickMarksSpacing', | ||
| 445 | 'tick_marks_spacing' => 'TickMarksSpacing', | ||
| 446 | 'is_automatic_tick_label_spacing' => 'IsAutomaticTickLabelSpacing', | ||
| 447 | 'tick_label_spacing' => 'TickLabelSpacing', | ||
| 448 | 'tick_label_position' => 'TickLabelPosition', | ||
| 449 | 'tick_label_rotation_angle' => 'TickLabelRotationAngle', | ||
| 450 | 'fill_format' => 'FillFormat', | ||
| 451 | 'effect_format' => 'EffectFormat', | ||
| 452 | 'line_format' => 'LineFormat', | ||
| 453 | 'major_grid_lines_format' => 'MajorGridLinesFormat', | ||
| 454 | 'minor_grid_lines_format' => 'MinorGridLinesFormat' | ||
| 455 | } ); | ||
| 456 | |||
| 457 | __PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); | ||
| 458 | |||
| 459 | |||
| 460 | 1; |