UNPKG

ni-webcharts-legends

Version:
30 lines (23 loc) 1.18 kB
## ni-scale-legend > A custom element that provides a scale legend. Use it to visualize and change the axis modes of a graph, chart or intensity graph element. It provides a list with all the axes of the graphs. Each axis in the list has two buttons - one to turn on/off the autoscaling for that axis and the other one sets the scale range to the data range (without changing the autoScale mode) Example: ```html <ni-cartesian-graph graph-ref="g1" value="[[2, 3, 5, 7, 11, 13, 17, 19], [0, 1, 1, 2, 3, 5, 8, 13]]"> <ni-cartesian-axis show label="Index" axis-position="bottom"></ni-cartesian-axis> <ni-cartesian-axis show label="Value" axis-position="left"></ni-cartesian-axis> <ni-cartesian-plot show label="Prime Numbers"> <ni-cartesian-plot-renderer line-width="2" line-stroke="red"> </ni-cartesian-plot-renderer> </ni-cartesian-plot> <ni-cartesian-plot show label="Fibonacci Numbers"> <ni-cartesian-plot-renderer line-width="2" line-stroke="blue"> </ni-cartesian-plot-renderer> </ni-cartesian-plot> </ni-cartesian-graph> <ni-scale-legend graph-ref="g1" mode="pan"></ni-scale-legend> ```