streamlinesocial / highcharts-regression

Linear and non-linear regression support for highcharts
MIT License
73 stars 64 forks source link

How to integrate math equation plugin like MathJax or CodeCogs? #103

Open ivder opened 4 years ago

ivder commented 4 years ago

I want to change the format of the equation displayed to the math equation using MathJax or CodeCogs. Usually the plugins will take an image or html input, I couldn't find a way to integrate it inside the regression settings, e.g. :

  {
                regression: showRegression,
                regressionSettings: {
                    type: 'polynomial',
                    color: colorList[x],
                    dashStyle: 'dash',
                    name: $${"%eq"}$$  // MathJax function
                },
                name: dataName[x],
                color: colorList[x],
                data: dataList[x]
            }