Open ashemetov opened 4 years ago
Ticket #5 suggested to implement support for semantics functions. This is definitely a good suggestion, but instead of embedding parser into plotta I would suggest to provide a sample how to integrate with math.js. Here is a sample:
const parser = math.parser(); function fn(x) { parser.set('x', x); return parser.evaluate(fn_str); } custom_fn.plotter.DeleteLine('pc_fn'); custom_fn.plotter.AddLine({ id: 'pc_fn',
... func: fn, ... });
Very good opinion. Thank you for your suggestion.
I actually have planned to include a parser, but as you say, I'll consider adding examples that utilize other libraries.
Ticket #5 suggested to implement support for semantics functions. This is definitely a good suggestion, but instead of embedding parser into plotta I would suggest to provide a sample how to integrate with math.js. Here is a sample:
... func: fn, ... });