C# Class Shared.Helpers.VisHelper

显示文件 Open project: sealuzh/PersonalAnalytics Class Usage Examples

Public Methods

Method Description
CreateChartHtmlTitle ( string visName ) : string

Get a the width of the item (already reduced with default side margin)

Get a the height of the item (already reduced with default title margin)

Gets the visualization name and creates a simple chart title by removing the whitespaces and lowercasing

Error ( string message = "An error occurred." ) : string

just display an error message in red

FormatChartTitle ( string title = "Visualization" ) : string

Returns a formated chart title with a specified title or a default one if there is none.

NotEnoughData ( string message = "We don't yet have enough data to show you a retrospection of your workday." ) : string

Returns a message that says that there is not enough data to provide a visualization and a standard message if no other is specified.

PrepareTimeAxis ( DateTimeOffset date, int>.Dictionary dto, int interval ) : void

Prepares the timeline axis, setting the first and last entry of the workday as start and end point

Method Details

CreateChartHtmlTitle() public static method

Get a the width of the item (already reduced with default side margin) Get a the height of the item (already reduced with default title margin) Gets the visualization name and creates a simple chart title by removing the whitespaces and lowercasing
public static CreateChartHtmlTitle ( string visName ) : string
visName string
return string

Error() public static method

just display an error message in red
public static Error ( string message = "An error occurred." ) : string
message string
return string

FormatChartTitle() public static method

Returns a formated chart title with a specified title or a default one if there is none.
public static FormatChartTitle ( string title = "Visualization" ) : string
title string
return string

NotEnoughData() public static method

Returns a message that says that there is not enough data to provide a visualization and a standard message if no other is specified.
public static NotEnoughData ( string message = "We don't yet have enough data to show you a retrospection of your workday." ) : string
message string
return string

PrepareTimeAxis() public static method

Prepares the timeline axis, setting the first and last entry of the workday as start and end point
public static PrepareTimeAxis ( DateTimeOffset date, int>.Dictionary dto, int interval ) : void
date DateTimeOffset
dto int>.Dictionary
interval int
return void