Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions main/SS/UserModel/Chart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ public interface IChart : ManuallyPositionable
/**
* @return an appropriate ChartDataFactory implementation
*/
IChartDataFactory GetChartDataFactory();
IChartDataFactory ChartDataFactory { get; }

/**
* @return an appropriate ChartAxisFactory implementation
*/
IChartAxisFactory GetChartAxisFactory();
IChartAxisFactory ChartAxisFactory { get; }

/**
* @return chart legend instance
Expand Down
75 changes: 29 additions & 46 deletions main/SS/UserModel/Charts/ChartAxis.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,99 +30,82 @@ public interface IChartAxis
/**
* @return axis id
*/
long GetId();
long Id { get; }

/**
* @return axis position
* get or set axis position
*/
AxisPosition GetPosition();
AxisPosition Position { get; set; }

/**
* @param position new axis position
* get or set axis number format
*/
void SetPosition(AxisPosition position);

/**
* @return axis number format
*/
String GetNumberFormat();

/**
* @param format axis number format
*/
void SetNumberFormat(String format);
String NumberFormat { get; set; }

/**
* @return true if log base is defined, false otherwise
*/
bool IsSetLogBase();
bool IsSetLogBase { get; }

/**
* @param logBase a number between 2 and 1000 (inclusive)
* @throws ArgumentException if log base not within allowed range
*/
void SetLogBase(double logBase);

/**
* @return axis log base or 0.0 if not Set
* @throws ArgumentException if log base not within allowed range
*/
double GetLogBase();
double LogBase { get; set; }

/**
* @return true if minimum value is defined, false otherwise
*/
bool IsSetMinimum();
bool IsSetMinimum { get; }

/**
* @return axis minimum or 0.0 if not Set
* get or set axis minimum
* 0.0 if not Set
*/
double GetMinimum();

/**
* @param min axis minimum
*/
void SetMinimum(double min);
double Minimum { get; set; }

/**
* @return true if maximum value is defined, false otherwise
*/
bool IsSetMaximum();
bool IsSetMaximum { get; }

/**
* @return axis maximum or 0.0 if not Set
* get or set axis maximum
* 0.0 if not Set
*/
double GetMaximum();
double Maximum { get; set; }

/**
* @param max axis maximum
* get or set axis orientation
*/
void SetMaximum(double max);
AxisOrientation Orientation { get; set; }

/**
* @return axis orientation
* get or set axis cross type
*/
AxisOrientation GetOrientation();
AxisCrosses Crosses { get; set; }

/**
* @param orientation axis orientation
* Declare this axis cross another axis.
* @param axis that this axis should cross
*/
void SetOrientation(AxisOrientation orientation);
void CrossAxis(IChartAxis axis);

/**
* @param crosses axis cross type
* @return visibility of the axis.
*/
void SetCrosses(AxisCrosses crosses);
bool IsVisible { get; set; }

/**
* @return axis cross type
* @return major tick mark.
*/
AxisCrosses GetCrosses();
AxisTickMark MajorTickMark { get; set; }

/**
* Declare this axis cross another axis.
* @param axis that this axis should cross
* @return minor tick mark.
*/
void CrossAxis(IChartAxis axis);
AxisTickMark MinorTickMark { get; set; }
}


Expand Down
18 changes: 18 additions & 0 deletions ooxml/OpenXmlFormats/Drawing/Chart/Chart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6126,6 +6126,24 @@ public List<CT_Extension> extLst
this.extLstField = value;
}
}

public CT_Boolean AddNewDelete()
{
this.deleteField = new CT_Boolean();
return this.deleteField;
}

public CT_TickMark AddNewMajorTickMark()
{
this.majorTickMarkField = new CT_TickMark();
return this.majorTickMarkField;
}

public CT_TickMark AddNewMinorTickMark()
{
this.minorTickMarkField = new CT_TickMark();
return this.minorTickMarkField;
}
}


Expand Down
19 changes: 11 additions & 8 deletions ooxml/XSSF/UserModel/Charts/XSSFCategoryAxis.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,12 @@ public XSSFCategoryAxis(XSSFChart chart, CT_CatAx ctCatAx)
this.ctCatAx = ctCatAx;
}

public override long GetId()
public override long Id
{
return ctCatAx.axId.val;
get
{
return ctCatAx.axId.val;
}
}

protected override CT_AxPos GetCTAxPos()
Expand Down Expand Up @@ -72,7 +75,7 @@ protected override CT_TickMark GetMinorCTTickMark()

public override void CrossAxis(IChartAxis axis)
{
ctCatAx.crossAx.val = (uint)axis.GetId();
ctCatAx.crossAx.val = (uint)axis.Id;
}

private void createAxis(long id, AxisPosition pos)
Expand All @@ -89,12 +92,12 @@ private void createAxis(long id, AxisPosition pos)
ctCatAx.AddNewMinorTickMark();


this.SetPosition(pos);
this.SetOrientation(AxisOrientation.MinToMax);
this.SetCrosses(AxisCrosses.AutoZero);
this.Position=(pos);
this.Orientation=(AxisOrientation.MinToMax);
this.Crosses=(AxisCrosses.AutoZero);
this.IsVisible = true;
this.SetMajorTickMark(AxisTickMark.Cross);
this.SetMinorTickMark(AxisTickMark.None);
this.MajorTickMark=(AxisTickMark.Cross);
this.MinorTickMark=(AxisTickMark.None);
}
}
}
Expand Down
Loading