JavaScript Graph Object, Part 12

Today I think I’m just going to list all of the TO DO items for the project while taking a moment to see if anything in the basic structure of the existing code might be reworked. Rather than continuously banging through these items, the list of which is rather extensive, I am likely to use the project for the reasons that inspired me to start it in the first place, and then work items off the list as the need appears.

For the next day or two I’ll be testing out all of the thermodynamic functions of saturated water (liquid and vapor) I created many years ago. Then I’ll work on describing the creation of the functions from the steam tables using the curve fit program I wrote (also a long time ago). Those activities will definitely require extension of the graph object, and I will ultimately be able to finish creating the online steam table page I started a few weeks ago.

  • Make functionality of axes more independent and modular.
    • Add switches to suppress or allow drawing of axis labels.
    • Add switches to suppress or allow drawing of axis tick values.
    • Add switches to suppress or allow drawing of axis itself.
    • Add switches to suppress or allow drawing of axis opposite boundary line.
    • Add ability to draw axes on either side of the graph (left or right and top or bottom).
    • Add ability to draw multiple axes and have different plots use appropriate scale. (Y-axis at least but possibly x-axis as well.)
    • Break up plot mechanism to provide pixel locations as a function of value and value as a function of pixel locations for each axis independently.
    • Add staggered drawing of x-axis tick value labels when they get too long.
    • Add ability to draw major ticks between labels. This would presumably eliminate drawing of minor ticks.
    • Ensure final tick on any axis does not get drawn one pixel out of place (current mechanism sometimes draws final tick one pixel beyond the end of an axis due to cumulative rounding error).
    • Add ability of graph to set its own y-axis range based on the function or data to be plotted (if it has identifiable extents). The basic parameters are in place for this but are not currently being leveraged. (Add a getRangeHiLo function.)
    • Allow major ticks to fall at arbitrary locations so they don’t always have to fall at the first and last pixel of each axis.
    • Save bounds of each axis and element as part of being able to capture click events.
    • Add ability to draw labels at arbitrary locations in graph area (labels and tick values would stay at outer edge of graph area?).
    • Add ability to draw plots as x-as-a-function-of-y. This effectively rotates plots 90 degrees clockwise for the ability to scroll vertically and plot things the way economists sometimes do.
  • Make location specifications for all elements more generic.
    • Outer boundaries are currently defined as the edges of the canvas, but should be able to be set arbitrarily, so a graph could be placed anywhere.
    • More elements could be placed as needed (plot/symbol legends, additional axes, etc.)
    • Allow more elements to be arbitrarily placed (graph title, legend, etc.).
  • Add more plot mechanisms (that leverage already modular plotting mechanism).
    • Plot from table entries rather than from continuous functions.
    • Plot from continuous functions that don’t include cyclic color information.
    • Add lines, scatters, bars, box-and-whisker plots (and outliers), stock plots, plots where symbol size and color provide additional meaning, etc.
    • Add horizontal and vertical range lines (to illustrate ranges, things like run plots as used in quality analysis, warning limits on scrolling graphs, and asymptotes).
    • Add ability to handle parametric function plots that aren’t simply y-as-a-function-of-x.
    • Add plot/symbol legends.
  • Add animation, scrolling, real-time, and data features.
    • Add ability to have scrolling graph update interactively as new data is added (real-time scrolling).
    • Plot series data as non-scrolling animation.
    • Have graph object modify or extend animation features as new data are received through a receiver function.
    • Have graph object be able to record data received through a receiver function. Include time stamps with data.
    • Have object be able to recall and review recorded data and meta-data.
    • Allow user to select with data stream or streams are to be reviewed and displayed.
    • Make recall/review functions work across files split by time period or other method.
  • Make graph objects movable and able to be interactively displayed, hidden, and dismissed.
    • Graphically within a single canvas. Would need to save information it covers while moving or displaying.
    • Entire canvas object within a DOM page.
  • Add user interactivity, especially as ability to select elements by mouse click and use menus and dialogs to effect modifications. Especially may need to allow selection of plot elements in graphing area.
    • Add UI support for interactive modification of graph element parameters. Probably use tabbed dialogs. Could be in separate window, expanded or slideout region, or popup.
    • Place more limits on values that can be assigned to various parameters (e.g., angle of rotation of tick value labels only between -90 and +90 degrees).
    • Include a flag to indicate when any element is modified that may require re-spacing other element or otherwise redrawing the graph. This may not be needed because that logic can be handled in various places.
    • Add ability to scroll across larger data set (at least horizontally) under user control.
    • Add ability to zoom in or out on x-axis scale.
    • Add ability to zoom in or out on y-axis scale.
    • Add ability to modify values by dragging plotted elements?
  • Incorporate general enhancements.
    • Add support for additional fonts and font sizes over 30px.
    • Handle labels with multiple lines.
    • Add arbitrary text comments and pointers.
    • Add ability to include user-defined symbols or images (e.g., Steve Martin’s rubber chicken graph).
    • Add transparency and ability to draw over (arbitrary/user-supplied) background image.
    • Save graph description as a list of parameterized elements by x- and y-coordinates and other properties to they can be redrawn after arbitrary rotations in two or three dimensions. Requires transform between plot space and display space and separate means of storage for both.
    • Provide ability to print graphs.
    • Provide ability to save graphs as images.
    • Provide ability to save (and read) graph as XML specification.
    • Make occasional passes through code to improve efficiency and clarity.
This entry was posted in Software and tagged , , . Bookmark the permalink.

Leave a Reply