Sha256: 62d0657723ef0b72def6d3a3aed0b2a2a1222e60fcb5fa5a4eb60c626ff687f2
Contents?: true
Size: 1.15 KB
Versions: 1
Compression:
Stored size: 1.15 KB
Contents
class Kakimasu.TranslationPercentChart constructor: (el) -> # Get translation percentage from the view percentage = $('.translation-percentage').data('value') # Set chart and text color if percentage <= 25 chartColor = '#8B0000' textColor = '#4D0000' else if percentage <= 50 && percentage > 25 chartColor = '#FF0000' textColor = '#B30000' else if percentage <=75 && percentage > 50 chartColor = '#FFA500' textColor = '#B37400' else if percentage <= 90 && percentage > 75 chartColor = '#808000' textColor = '#808000' else if percentage <= 99 && percentage > 90 chartColor = '#6B8E23' textColor = '#3D5214' else chartColor = '#008000' textColor = '#003300' # translation percentage circle diagram $('#translation-percentage-circle').circliful animation: 1 animationStep: 2 start: 2 showPercent: 1 percent: percentage backgroundColor: '#666666' foregroundColor: chartColor fontColor: textColor multiPercentage: 1 foregroundBorderWidth: 15 backgroundBorderWidth: 1 percentageY: 105
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
kakimasu-1.0.0 | vendor/assets/javascripts/components/translation_percent_chart.coffee |