Tabnine Logo
RenderApplicationPieChartDirective.drawPie
Code IndexAdd Tabnine to your IDE (free)

How to use
drawPie
method
in
org.jboss.windup.rules.apps.java.reporting.freemarker.RenderApplicationPieChartDirective

Best Java code snippets using org.jboss.windup.rules.apps.java.reporting.freemarker.RenderApplicationPieChartDirective.drawPie (Showing top 3 results out of 315)

origin: org.jboss.windup.rules.apps/rules-java

@Override
public void execute(Environment env, @SuppressWarnings("rawtypes") Map params, TemplateModel[] loopVars,
      TemplateDirectiveBody body)
      throws TemplateException, IOException
{
  StringModel projectStringModel = (StringModel) params.get("project");
  ProjectModel projectModel = (ProjectModel) projectStringModel.getWrappedObject();
  String filename = projectModel.getRootFileModel().getPrettyPath();
  TemplateBooleanModel recursiveBooleanModel = (TemplateBooleanModel) params.get("recursive");
  boolean recursive = recursiveBooleanModel.getAsBoolean();
  SimpleScalar elementIDStringModel = (SimpleScalar) params.get("elementID");
  String elementID = elementIDStringModel.getAsString();
  TypeReferenceService typeReferenceService = new TypeReferenceService(context);
  Map<String, Integer> data = typeReferenceService.getPackageUseFrequencies(projectModel, 2, recursive);
  if (data.keySet().size() > 0)
  {
    drawPie(env.getOut(), data, elementID);
  }
  else
  {
    // if we aren't drawing a pie, remove the element that would have held it
    Writer writer = env.getOut();
    writer.append("<script type='text/javascript'>");
    writer.append("$('#" + elementID + "').parent().remove()");
    writer.append("</script>");
  }
}
origin: windup/windup

drawPie(env.getOut(), data, elementID);
origin: org.jboss.windup.rules.apps/windup-rules-java-api

drawPie(env.getOut(), data, elementID);
org.jboss.windup.rules.apps.java.reporting.freemarkerRenderApplicationPieChartDirectivedrawPie

Popular methods of RenderApplicationPieChartDirective

  • topX

Popular in Java

  • Finding current android device location
  • scheduleAtFixedRate (Timer)
  • onRequestPermissionsResult (Fragment)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • BoxLayout (javax.swing)
  • JButton (javax.swing)
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now