StriplineDirective

Hi,

How do i use stripline directive programmatically?  The code below does not produce any error and also it does not display the stripline.  


public stripline: StripLineSettingsModel = {
start: 150,
end: 300,
color: '#0D97D4',
};

public primaryYAxis: AxisModel = {
minimum: 0, maximum: 300, title: 'Temperature',
stripLines: [this.stripline],
};

3 Replies

AK Albert K December 1, 2017 06:48 AM UTC


I have located the problem, I miss out add the StripLineService in the module.ts.   It is possible to have a warning during compile or runtime ?  I spend like one day trying out various settings as there was no error, not in compile, build or debug.

Thank you.


DD Dharanidharan Dharmasivam Syncfusion Team December 1, 2017 07:27 AM UTC

Hi Albert, 

Thanks for using our products. 

We have analyzed your query. You requirement of stripline can be achieved by specifying stripline directly in the required axis as depicted below. Kindly find the code snippet below to achieve this requirement. 

Angular: 
//Required module for stripline. Need to import and inject the below module for stripline. Note that in the provided sample we have loaded all the chart module 
import { StripLine } from '@syncfusion/ej2-ng-charts'; 
 
public primaryYAxis: Object = { 
    //Initializing Striplines 
    stripLines: [ 
      { 
        start: 20, 
        end: 30, 
        color: '#0D97D4', 
      } 
    ] 
  }; 
 
<ej-chart [primaryYAxis]='primaryYAxis'> 
</ej-chart> 


Screenshot: 
 

Sample for reference can be find from below link. 

Kindly revert us, if you have any concerns. 

Thanks, 
Dharani.


DD Dharanidharan Dharmasivam Syncfusion Team December 15, 2017 07:02 AM UTC

Hi Albert, 

Thanks for your patience. 

We have considered your requirement for warning the missing module injection in chart component and logged improvement task for your scenario. As per this scenario, console error will be thrown for the modules which are not included. We are working on this and will be available in any of our upcoming Essential Studio release. You can communicate with us regarding the open features at any time using the “Contact” option. 

Thanks, 
Dharani. 


Loader.
Up arrow icon