To create visualizations, you must use transforming commands like stats, chart, or timechart. These commands structure search results into a data table that can be graphed.
timechart creates a chart with time on the x-axis, which is perfect for identifying trends.
index=sales | timechart sum(price) by product_category