1 module libxlsxd.chartaxis; 2 3 import libxlsxd.xlsxwrap; 4 5 struct Chartaxis { 6 lxw_chart_axis* handle; 7 import libxlsxd.chart; 8 import std.exception : enforce; 9 import std.string : toStringz; 10 import std.conv : to; 11 12 this(lxw_chart_axis* handle) @nogc nothrow pure @safe { 13 this.handle = handle; 14 } 15 16 void setName(string name) { 17 chart_axis_set_name(this.handle, toStringz(name)); 18 } 19 20 void setNameRange(string sheetname, lxw_row_t row, lxw_col_t col) { 21 chart_axis_set_name_range(this.handle, toStringz(sheetname), row, 22 col 23 ); 24 } 25 26 void setNameFont(lxw_chart_font* font) @nogc nothrow { 27 chart_axis_set_name_font(this.handle, font); 28 } 29 30 void setNumFont(lxw_chart_font* font) @nogc nothrow { 31 chart_axis_set_num_font(this.handle, font); 32 } 33 34 void setNumFormat(string numFormat) { 35 chart_axis_set_num_format(this.handle, toStringz(numFormat)); 36 } 37 38 void setLine(lxw_chart_line* line) @nogc nothrow { 39 chart_axis_set_line(this.handle, line); 40 } 41 42 void setFill(lxw_chart_fill* fill) @nogc nothrow { 43 chart_axis_set_fill(this.handle, fill); 44 } 45 46 void setPattern(lxw_chart_pattern* pattern) @nogc nothrow { 47 chart_axis_set_pattern(this.handle, pattern); 48 } 49 50 void setReverse() @nogc nothrow { 51 chart_axis_set_reverse(this.handle); 52 } 53 54 void setCrossing(double value) @nogc nothrow { 55 chart_axis_set_crossing(this.handle, value); 56 } 57 58 void setCrossing_max() @nogc nothrow { 59 chart_axis_set_crossing_max(this.handle); 60 } 61 62 void off() @nogc nothrow { 63 chart_axis_off(this.handle); 64 } 65 66 void setPosition(ubyte position) @nogc nothrow { 67 chart_axis_set_position(this.handle, position); 68 } 69 70 void setLabelPosition(ubyte position) @nogc nothrow { 71 chart_axis_set_label_position(this.handle, position); 72 } 73 74 void setLabelAlign(ubyte align_) @nogc nothrow { 75 chart_axis_set_label_align(this.handle, align_); 76 } 77 78 void setMin(double min) @nogc nothrow { 79 chart_axis_set_min(this.handle, min); 80 } 81 82 void setMax(double max) @nogc nothrow { 83 chart_axis_set_max(this.handle, max); 84 } 85 86 void setLogBase(ushort base) @nogc nothrow { 87 chart_axis_set_log_base(this.handle, base); 88 } 89 90 void setMajorTickMark(ubyte mark) @nogc nothrow { 91 chart_axis_set_major_tick_mark(this.handle, mark); 92 } 93 94 void setMinorTickMark(ubyte mark) @nogc nothrow { 95 chart_axis_set_minor_tick_mark(this.handle, mark); 96 } 97 98 void setIntervalUnit(ushort unit) @nogc nothrow { 99 chart_axis_set_interval_unit(this.handle, unit); 100 } 101 102 void setIntervalTick(ushort tick) @nogc nothrow { 103 chart_axis_set_interval_tick(this.handle, tick); 104 } 105 106 void setMajorUnit(double unit) @nogc nothrow { 107 chart_axis_set_major_unit(this.handle, unit); 108 } 109 110 void setMinorUnit(double unit) @nogc nothrow { 111 chart_axis_set_minor_unit(this.handle, unit); 112 } 113 114 void setDisplayUnits(ubyte unit) @nogc nothrow { 115 chart_axis_set_display_units(this.handle, unit); 116 } 117 118 void setDisplayUnitsVisible(bool isVisiable ) { 119 chart_axis_set_display_units_visible(this.handle, to!ubyte(isVisiable)); 120 } 121 122 void majorGridlinesSetVisible(bool isVisiable) { 123 chart_axis_major_gridlines_set_visible(this.handle, to!ubyte(isVisiable)); 124 } 125 126 void minorGridlinesSetVisible(bool isVisiable) { 127 chart_axis_minor_gridlines_set_visible(this.handle, to!ubyte(isVisiable)); 128 } 129 130 void majorGridlinesSetLine(lxw_chart_line* line) @nogc nothrow { 131 chart_axis_major_gridlines_set_line(this.handle, line); 132 } 133 134 void minorGridlinesSetLine(lxw_chart_line* line) @nogc nothrow { 135 chart_axis_minor_gridlines_set_line(this.handle, line); 136 } 137 }