| 276 | } |
| 277 | |
| 278 | void Demo_Config() { |
| 279 | IMGUI_DEMO_MARKER("Config"); |
| 280 | ImGui::ShowFontSelector("Font"); |
| 281 | ImGui::ShowStyleSelector("ImGui Style"); |
| 282 | ImPlot::ShowStyleSelector("ImPlot Style"); |
| 283 | ImPlot::ShowColormapSelector("ImPlot Colormap"); |
| 284 | ImPlot::ShowInputMapSelector("Input Map"); |
| 285 | ImGui::Separator(); |
| 286 | ImGui::Checkbox("Use Local Time", &ImPlot::GetStyle().UseLocalTime); |
| 287 | ImGui::Checkbox("Use ISO 8601", &ImPlot::GetStyle().UseISO8601); |
| 288 | ImGui::Checkbox("Use 24 Hour Clock", &ImPlot::GetStyle().Use24HourClock); |
| 289 | ImGui::Separator(); |
| 290 | if (ImPlot::BeginPlot("Preview")) { |
| 291 | static double now = (double)time(nullptr); |
| 292 | ImPlot::SetupAxisScale(ImAxis_X1, ImPlotScale_Time); |
| 293 | ImPlot::SetupAxisLimits(ImAxis_X1, now, now + 24*3600); |
| 294 | for (int i = 0; i < 10; ++i) { |
| 295 | double x[2] = {now, now + 24*3600}; |
| 296 | double y[2] = {0,i/9.0}; |
| 297 | ImGui::PushID(i); |
| 298 | ImPlot::PlotLine("##Line",x,y,2); |
| 299 | ImGui::PopID(); |
| 300 | } |
| 301 | ImPlot::EndPlot(); |
| 302 | } |
| 303 | } |
| 304 | |
| 305 | //----------------------------------------------------------------------------- |
| 306 |
no test coverage detected