GBonnaire / jspreadsheet-plugins-and-editors

Plugins and Editors for JSpreadsheet Pro 7, Pro 8 and Pro 9
https://repo.gbonnaire.fr/category/jspreadsheetpro
MIT License
13 stars 0 forks source link

statistics plugin function doc parameter names? #26

Closed dmt0 closed 1 year ago

dmt0 commented 1 year ago

Plugin Name with version

2.0.6

JSpreadsheet version

v9.x

Describe the bug

image

In the header of the docs, where do the parameter names come from? Here's my object defining the parameter docs:

  STUDENTSTTESTONESAMPLE: [
    {type: 'Range', comment: 'sample: The sample/mandatory'},
    {
      type: 'Decimal',
      comment: 'nullHypothesisMean: The presumed mean value, optional, default 0',
    },
    {
      type: 'Enumerated',
      comment: 'scale: The type of scale of the sample:\n' + scaleParams,
    },
    {
      type: 'Decimal',
      comment:
        'epsilon: The threshold below which further iterative calculation methods are abandoned, optional, default=0.00001',
    },
    {
      type: 'Decimal',
      comment:
        'spougeConstant: Defines the constant a in Spouge’s approximation of the gamma function., optional, default=40',
    },
  ],

So for all parameters except for the first the name of the parameter is the substring of comment before the :, but for the first one it's type, so it says Range instead of sample as I would expect.

Reproduction steps

1.
2.
3.
...
GBonnaire commented 1 year ago

Hi

jspreadsheet.formulasDoc['MYFUNCTION()'] = {
       syntax:"MYFUNCTION(value, value)", // In header area of documentation
       about:"My custom function description ", // In content area of documentation, position 1
       params:[ 
           {type:"Float", comment:"First value"},
           {type:"Float", comment:"Second value"}
        ], // In content area of documentation, position 2
       examples:"MYFUNCTION(2008, 7) equals 25", // In content area of documentation, position 3
       link:"https://mydocs.domain.ext/doc/123456" // In content area of documentation, position 4
}

With last version of statistics, you need rename functions in your own documentation

dmt0 commented 1 year ago

Thanks, got it! The syntax field is what I was looking for.