Which panels can be switched between each other?

Among the Logs, Stat, Table, Gauge, Time Series, and Pie Chart panels, which panels can be switched, and are there any points to keep in mind when switching?

Or how to switch??

If anyone knows, please comment..

++I use LogQL and Loki as my data source.

Hello @limsh98
i have implement all the visualization using postgres data source

You can switch between most panels like Stat, Gauge, Table, Time Series, and Pie Chart easily.
However, Logs is a special panel type and may not work well when switched to/from others unless the data format supports it.

To switch visualization:

choose a different visualization type/suggetion

Adjust the query or options if needed
impliment visualization with Minear changes using postgres data source :-

Step: 1 Create data and imsert Dummy data

CREATE TABLE sensor_record (
    id SERIAL PRIMARY KEY,
    device_id VARCHAR(20),
    sensor_type VARCHAR(20),
    location VARCHAR(50),
    value NUMERIC,
    status VARCHAR(10),
    recorded_at TIMESTAMP
);

INSERT INTO sensor_record (device_id, sensor_type, location, value, status, recorded_at)
VALUES
('dev001', 'temperature', 'New York', 22.5, 'OK', '2025-08-01 08:00:00'),
('dev002', 'humidity', 'Chicago', 55.3, 'OK', '2025-08-01 08:05:00'),
('dev003', 'pressure', 'Los Angeles', 101.2, 'OK', '2025-08-01 08:10:00'),
('dev004', 'co2', 'Houston', 400.0, 'OK', '2025-08-01 08:15:00'),

Step: 2 Integrate data souce with Grafana Dashboard

Step: 3 implementation of diffenent visualization suing single postgresql data with minor changes

1. Table Visualization :-
panel query
select * from sensor_record

2. Stat Visualization :-
Panel query :-

SELECT
  recorded_at AS "time",
  value,
  sensor_type
FROM sensor_record
WHERE $__timeFilter(recorded_at)

3. Bar chart visualization :-
panel query :-1

SELECT
  sensor_type,
  COUNT(*) AS num_records,
  AVG(value) AS avg_value,
  MIN(value) AS min_value,
  MAX(value) AS max_value
FROM sensor_record
WHERE $__timeFilter(recorded_at)
GROUP BY sensor_type
ORDER BY sensor_type

4. Pi chart visualization
panel query :-

SELECT
  sensor_type,
  COUNT(*) AS num_records,
  AVG(value) AS avg_value,
  
  MAX(value) AS max_value
FROM sensor_record
WHERE $__timeFilter(recorded_at)
GROUP BY sensor_type
ORDER BY sensor_type

5. Gauge visualization implementation
Panel query :-1

SELECT
  sensor_type,
  AVG(value) AS avg_value,
  MAX(value) AS max_value
FROM sensor_record
WHERE $__timeFilter(recorded_at)
GROUP BY sensor_type
ORDER BY sensor_type

6. Time series visualization
panel query :
select * from sensor_record

Using Business chart you can switch to any type of chart