Skip to content

Custom timeline

Custom timeline gets data from custom service. Use this option, if you'd like to show data from other sources in ManicTime. For example, lets say you have a database with phone calls. You can create a service which will read the phone calls from the database and show them on a separate timeline within ManicTime.

How ManicTime communicates with the service

When you register a plugin you need to provide an URL of your service. URL will be called every time the day changes or when Refresh is triggered (based on Refresh rate). For example, lets say sample service URL is (you would use this URL when adding a plugin):

http://www.manictime.com/sampleData/CustomTimeline/OnlyTimes/

Every time this service is called, ManicTime will append start and end parameters. For example:

http://www.manictime.com/sampleData/CustomTimeline/OnlyTimes/?FromTime=2011-03-10T00:00:00&ToTime=2011-03-11T00:00:00

Your service should use these parameters to return only results which match time limitation.

What service returns

Service should return an XML response. Most of the elements are optional, so at the very least service only needs to return start and end times:


    <Timeline>
      <Activities>
        <Activity>
          <StartTime>2011-02-15T07:14:09+01:00</StartTime>
          <EndTime>2011-02-15T09:08:29+01:00</EndTime>
        </Activity>
        <Activity>
          <StartTime>2011-02-15T09:08:50+01:00</StartTime>
          <EndTime>2011-02-15T09:21:33+01:00</EndTime>
        </Activity>
      </Activities>
    </Timeline>

Example

Use this link in ManicTime: http://www.manictime.com/sampleData/CustomTimeline/OnlyTimes/

Sample response

 

To add a title and a default color with which they are presented:


    <Timeline>
      <Color>1010FF</Color>
      <Activities>
        <Activity>
          <DisplayName>First activity</DisplayName>
          <StartTime>2011-02-15T07:14:09+01:00</StartTime>
          <EndTime>2011-02-15T09:08:29+01:00</EndTime>
        </Activity>
        <Activity>
          <DisplayName>Second activity</DisplayName>
          <StartTime>2011-02-15T09:08:50+01:00</StartTime>
          <EndTime>2011-02-15T09:21:33+01:00</EndTime>
        </Activity>
      </Activities>
    </Timeline>

Example
Use this link in ManicTime: http://www.manictime.com/sampleData/CustomTimeline/TimesAndTitle/
Sample response

 

Default timelines in ManicTime have activities which belong to groups. On day view you can see activities on bottom left side, and groups on bottom right side. For example, Firefox is a group, individual page you visited is an activity. You can also add groups to the XML response. So a response with groups and activities would look like:


   <Timeline>
      <Color>1010FF</Color>
      <Activities>
        <Activity>
          <GroupId>1</GroupId>
          <DisplayName>Visit to Google home page</DisplayName>
          <StartTime>2011-02-15T07:14:09+01:00</StartTime>
          <EndTime>2011-02-15T09:08:29+01:00</EndTime>
        </Activity>
        <Activity>
          <GroupId>2</GroupId>
          <DisplayName>Visit to Bing home page</DisplayName>
          <StartTime>2011-02-15T09:08:50+01:00</StartTime>
          <EndTime>2011-02-15T09:21:33+01:00</EndTime>
        </Activity>
      </Activities>
      <Groups>
        <Group>
          <GroupId>1</GroupId>
          <Color>FF1010</Color>
          <DisplayName>Firefox</DisplayName>
        </Group>
        <Group>
          <GroupId>2</GroupId>
          <DisplayName>IE</DisplayName>
        </Group>
      </Groups>
    </Timeline>

Example
Use this link in ManicTime: http://www.manictime.com/sampleData/CustomTimeline/ActivitiesAndGroups/
Sample response

 

To get started, you can also take a look at a sample ASP.NET MVC3 project.

Feedback and Knowledge Base