angulartypescriptjustgage

justgage eve is not defined


I am working with angular to rebuild an angularjs application to an angular application. now I need to import justgage to show a score. everything is going fine except that it does not show the final score.

I have tried to debug the main problem by looping through my code but can't find anything. I have asked my question also on the GitHub but no response yet.

this is my module.

import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { TranslateModule } from '@ngx-translate/core';
import { FlexLayoutModule } from '@angular/flex-layout';

import { MaterialModule } from '@app/material.module';
import { DetailsRoutingModule } from './details-routing.module';
import { DetailsComponent } from './details.component';
import { MeasuresService } from '../measures.service';
import * as PlotlyJS from 'plotly.js/dist/plotly.js';
import { PlotlyModule } from 'angular-plotly.js';
import { JustgageModule } from 'angular2-justgage';
PlotlyModule.plotlyjs = PlotlyJS;

import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { GraphsService } from '@app/measure/details/graph.service';



@NgModule({
  imports: [
    CommonModule,
    PlotlyModule,
    TranslateModule,
    FlexLayoutModule,
    MaterialModule,
    DetailsRoutingModule,
    FormsModule,
    ReactiveFormsModule,
    JustgageModule

  ],
  declarations: [
    DetailsComponent,
  ],
  providers: [
    MeasuresService,
    GraphsService
  ]
})
export class DetailsModule { }

it does give my options that i use in the html into the justgageModule


<justgage *ngIf="options.title != null" [options]="options" [max]="max" [value]="score"></justgage>

for results, it does show the gage but it doesn't show the animation or the value when it is loaded


Solution

  • this is a problem with justgage

    I have found out that the version of Raphael that is included in the justgage is not working. the same is for the latest version of Raphael you need 2.2.7 works for me

    hope this will help some people