Rendering Script
Overview
- A rendering script (RJS) is designed to process high-frequency drawing tasks in Smart MiniApp. To develop a Panel MiniApp, the
Rayframework is recommended. - The operating environment, instance methods, and things to note for the
RJSare described in Rendering Script for Smart MiniApp. This topic also applies toRJSdevelopment on top of theRayframework.
Example
- The following code block shows the chart component.
Things to note
- The preceding examples apply to both WeChat and Smart MiniApp. To run them on WeChat, the Ray version must be
v0.7.12or later. - When you run
getCanvasByIdon WeChat, set its second parameter to pass in an instance of components or pages. - Due to the restrictions of WeChat miniApps, the nodes of native components for miniApps cannot be directly obtained to render pages. To use
.rjson pages, you must first callusePageInstanceto get the page instance, then useselectComponentto get the native component instance.