Skip to content

Instantly share code, notes, and snippets.

@jongio
Created October 11, 2016 21:13
Show Gist options
  • Select an option

  • Save jongio/1d0bb8283729e459d69204e53706a563 to your computer and use it in GitHub Desktop.

Select an option

Save jongio/1d0bb8283729e459d69204e53706a563 to your computer and use it in GitHub Desktop.
this.settings = {
minValue: getValue<number>(objects, 'text', 'minValue', 0), // The gauge minimum value.
maxValue: getValue<number>(objects, 'text', 'maxValue', 100), // The gauge maximum value.
circleThickness: getValue<number>(objects, 'circle', 'circleThickness', .05, .9), // The outer circle thickness as a percentage of it's radius.
circleFillGap: getValue<number>(objects, 'circle', 'circleFillGap', .05), // The size of the gap between the outer circle and wave circle as a percentage of the outer circles radius.
circleColor: getValue<Fill>(objects, 'circle', 'circleColor', { solid: { color: "#178BCA" } }).solid.color, // The color of the outer circle.
waveHeight: getValue<number>(objects, 'wave', 'waveHeight', .05), // The wave height as a percentage of the radius of the wave circle.
waveCount: getValue<number>(objects, 'wave', 'waveCount', 5), // The number of full waves per width of the wave circle.
waveRiseTime: getValue<number>(objects, 'wave', 'waveRiseTime', 1000), // The amount of time in milliseconds for the wave to rise from 0 to it's final height.
waveAnimateTime: getValue<number>(objects, 'wave', 'waveAnimateTime', 18000), // The amount of time in milliseconds for a full wave to enter the wave circle.
waveRise: getValue<boolean>(objects, 'wave', 'waveRise', true), // Control if the wave should rise from 0 to it's full height, or start at it's full height.
waveHeightScaling: getValue<boolean>(objects, 'wave', 'waveHeightScaling', true), // Controls wave size scaling at low and high fill percentages. When true, wave height reaches it's maximum at 50% fill, and minimum at 0% and 100% fill. This helps to prevent the wave from making the wave circle from appear totally full or empty when near it's minimum or maximum fill.
waveAnimate: getValue<boolean>(objects, 'wave', 'waveAnimate', true), // Controls if the wave scrolls or is static.
waveColor: getValue<Fill>(objects, 'wave', 'waveColor', { solid: { color: "#178BCA" } }).solid.color, // The color of the fill wave.
waveOffset: getValue<number>(objects, 'wave', 'waveOffset', 0), // The amount to initially offset the wave. 0 = no offset. 1 = offset of one full wave.
textVertPosition: getValue<number>(objects, 'text', 'textVertPosition', .5), // The height at which to display the percentage text withing the wave circle. 0 = bottom, 1 = top.
textSize: getValue<number>(objects, 'text', 'size', 1), // The relative height of the text to display in the wave circle. 1 = 50%
valueCountUp: getValue<boolean>(objects, 'text', 'valueCountUp', true), // If true, the displayed value counts up from 0 to it's final value upon loading. If false, the final value is displayed.
displayPercent: getValue<boolean>(objects, 'text', 'displayPercent', true), // If true, a % symbol is displayed after the value.
textColor: getValue<Fill>(objects, 'text', 'textColor', { solid: { color: "#045681" } }).solid.color, // The color of the value text when the wave does not overlap it.
waveTextColor: getValue<Fill>(objects, 'text', 'waveTextColor', { solid: { color: "#A4DBf8" } }).solid.color // The color of the value text when the wave overlaps it.
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment