question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Adding "title" Option Like "subtitle" for easier usage

See original GitHub issue

I needed to Have Custom title for Each Dynamically generated chart, without needing to implement a callback function using [titleFormat] option. to work with my code

<div class="col-md-4" *ngFor='let usage of usages,let i = index'>
                <div class="circle-progress">
                        <div class="circle-radius hide" ></div>				
                        <circle-progress 
                        [percent]="usage.usagePercentage"
                        [outerStrokeColor]="usage.type"
                        [backgroundStroke]="usage.type"
                        [titleColor]="usage.type"
                        [subtitleColor]="usage.type"	
                        [unitsColor]="usage.type"
                        [space] = "0"	
                        [showUnits]="false"
                        [animateTitle]="false"
                        [title]="usage.englishDisplayName"
                        [subtitle]="usage.englishSubName"
>
                        </circle-progress>
                    </div>
                    <p class="text-center text-primary"><strong>{{usage.usedAmount}} {{'AccountOverview.of' |translate}} {{usage.initialTotalAmount}} 
                        <small *ngIf="this.translationService.language=='Ar'">{{usage.measureUnitArName}}</small><small *ngIf="this.translationService.language=='En'">{{usage.measureUnitEnName}}</small></strong> <em class="icon-{{usage.mesaureUnitId}}"></em></p>					
                    
        </div>

I managed to Achieve that by editing in the plugin files which is a terrible thing to do of course, Is there a possibility that you support this feature soon? @bootsoon I have attached the edited files FYI.

ng-circle-progress Modified Files.zip

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
bootsooncommented, Nov 5, 2017

@DinaKhAhmed Here is my modification:

// 0.9.6
(this.options.titleFormat !== undefined && this.options.titleFormat.constructor.name === 'Function')
          ? this.options.titleFormat(titlePercent) : (this.options.title === 'auto' ? titleTextPercent : this.options.title),
// 0.9.5
(this.options.titleFormat !== undefined && this.options.titleFormat.constructor.name === 'Function')
          ? this.options.titleFormat(titlePercent) : titleTextPercent,
1reaction
bootsooncommented, Nov 5, 2017

@DinaKhAhmed Sorry, I cannot find any code in https://github.com/DinaKhAhmed/ng-circle-progressWithTitleOption . Where is the ‘./src’ folder?

Please update to 0.9.6. I’ve added a ‘title’ option which defaults to ‘auto’, meaning ‘percentage is displayed automatically’.

<div class="col-md-4" *ngFor='let usage of usages,let i = index'>
    <div class="circle-progress">
        <div class="circle-radius hide" ></div>				
        <circle-progress 
            [title]="usage.englishDisplayName"
            [showUnits]="false">
        </circle-progress>
    </div>
</div>
Read more comments on GitHub >

github_iconTop Results From Across the Web

Video Editing 101: How to Add Titles and Subtitles in Premiere ...
To create your own titles, go to the “Edit” tab of the Essential Graphics panel. From there, there's going to be a small...
Read more >
GGPlot Title, Subtitle and Caption : The Ultimate Guide
This article describes how to add and change a main title, a subtitle and a caption to a graph generated using the ggplot2...
Read more >
CAPTIONS and SUBTITLES in Premiere Pro CC 2021 ...
Everything you need to know about captions in Premiere Pro - with chapters for easy viewing!CHAPTERS:00:00 Intro00:21 The Captions ...
Read more >
Best Software to Add Captions or Subtitles to a Video in 2022
How to add captions to videos with different software ; Movavi Video Editor. Customizable subtitles, captions, and titles. Easy editing and ...
Read more >
How to Add Captions and Subtitles to Your Videos: 5 Easy ...
Not to toot our own horn, but we like to think that our captioning tool at Wave.video is hands-down the simplest and most...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found