aspose.diagram
Class MilestoneHelper

MilestoneHelper to set property of milestone shape.

Example:

var aspose = aspose || {};
aspose.diagram = require("aspose.diagram");

diagram = new aspose.diagram.Diagram("DrawingTimeLine.vsdx");

////////////// Modify time line ///////////
startDate = new aspose.diagram.DateTime(2015, 8, 1);
endDate = new aspose.diagram.DateTime(2016, 6, 1);
fisYear = startDate;

// Get page
pageName = "Page-1";
page = diagram.getPages().getPage(pageName);

timelineId = 1;
timeline = diagram.getPages().getPage(pageName).getShapes().getShape(timelineId);
xpos = timeline.getXForm().getPinX().getValue();
ypos = timeline.getXForm().getPinY().getValue();

// Add milestone
milestoneMasterName = "2 triangle milestone";

// Add Master
diagram.addMaster("Timeline.vss", milestoneMasterName);

// Add Shape in Visio diagram using AddShape method
milestoneShapeId = diagram.addShape(xpos, ypos, milestoneMasterName, 0);

// Get the shape based on ID
milestone = page.getShapes().getShape(milestoneShapeId);

// Instantiate MilestoneHelper object
milestoneHelper = new aspose.diagram.MilestoneHelper(milestone);

// Set Milestone Date
milestoneHelper.setMilestoneDate(new aspose.diagram.DateTime(2015, 8, 1));

// Set IsAutoUpdate to true
milestoneHelper.setAutoUpdate(true);

// RefreshMilesone of timeline shape
milestoneHelper.refreshMilestone(timeline);

diagram.save("out-RefreshMilestone.vsdx", aspose.diagram.SaveFileFormat.VSDX);

Constructor Summary
MilestoneHelper(shape)
          
 
Property Getters/Setters Summary
functionsetDateFormat(value)
           DateFormat of shape
functionsetDateFormatString(value)
           DateFormat string of shape
functionsetAutoUpdate(value)
           whether to update data for markers (milestones, intervals) as they are moved on timeline
functiongetMilestoneDate()
           Milestone date
functionsetType(value)
           Type of shape
 
Method Summary
functionrefreshMilestone(timeline)
           Refresh milestone
 

Constructor Detail

MilestoneHelper

function MilestoneHelper(shape)

Property Getters/Setters Detail

getMilestoneDate : DateTime 

function getMilestoneDate()
Milestone date

setAutoUpdate : boolean 

function setAutoUpdate(value)
whether to update data for markers (milestones, intervals) as they are moved on timeline

setType : Number 

function setType(value)
Type of shape

setDateFormat : Number 

function setDateFormat(value)
DateFormat of shape
Value Format String 
0dddd, yyyy-M-d
1yyyy-MM-dd
2yy-MMM-d
3yyyy/M/d
4yy-MMM.-d
5d MMMM yyyy
6yy-M
7MMM-yy
8MMMM d, yyyy
9MMM d, yyyy
10M-d-yy
11M-d
12d MMMM, yyyy
13d MMM, yyyy
14d-M-yy
15d-M
16yy-M-d
17yyyy-M-d
18M-yy
19M-yyyy
20MMMM yyyy
21MMMM yy
22MMM yyyy
23MMM yy
24yy
25yyyy
26d
27MMMM
28MMM
29M
30MM/dd/yyyy

setDateFormatString : String 

function setDateFormatString(value)
DateFormat string of shape

Method Detail

refreshMilestone

function refreshMilestone(timeline)
Refresh milestone

See Also:
          Aspose.Cells Documentation - the home page for the Aspose.Cellss Product Documentation.
          Aspose.Cells Support Forum - our preferred method of support.