-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Standardize a context type representing a Chart #654
Comments
Ok, I have a couple of questions/issues around this, which hopefully you can answer. My understanding is that the ViewChart intent is there to allow a App A (say a blotter) to request another app (App B) to show a chart. However, it seems like there is a separation of concerns issue:
it seems like the context data in this case is just the list of instruments, and would be known by App A. However, all the rest of the data would have to be worked out by App B as a result of the request (maybe they are controls on the app to decide how it looks / range / scale etc). Otherwise, App A now has to understand the other concerns of all the possible apps that are going to potentially use this data. |
A list of one or more instruments is pretty much the bare minimum for plotting a chart. If we're talking about financial/pricing charts it's not unreasonable to assume further details including range and plot type (style). We (in this case, ChartIQ) also think indicators are pretty fundamental to technical analysis charts, but agreed to draw those back to However, its also worth noting the In short, there's a lot we can do if we can make some small assumptions about charts. |
We had a further chat about this off to the side:
Well... those fields are optional (where instruments isn't), so it doesn't have to know, but it might. This is particular relevant in those cases where you are looking to reproduce a specific chart. Charting engines can often plot data relating to the same underlying entities in very different ways, e.g. For a set of instruments, I might want a scatterplot of trades (against time), a heatmap of trading activity, or a pricing chart (candle/mountain/line). These might be different chart applications OR they might be different styles in the same application. The current lack of a chart type severely limits our options for what we can be requested via ViewChart, but also prevents the chart state reproduction use case without a proprietary type (for something that can be modelled independently of the particular charting application). |
I can see what you are saying about reproducing a chart. However, that's a very different use-case from the one in the original description. And, it would only be useful if you were wanting to reproduce a chart in a totally different charting app: if it were the same charting app, then it would be better off using it's own home-grown A (possibly) better use-case for having the Chart context would be so that other apps could add their intents to it, or listen to the changes to a chart on a channel. But I'm struggling to think of an example of where that might be useful though. |
What this does make me wonder (again, caveat the fact I am very new to this project and may have missed something painfully obvious to the more experienced hands) is shouldn't FDC3 have an API for storing configuration/preferences for each app? In VSCode, for example, each installed plugin can contribute settings pages to the overall settings manager, and also retrieve its settings information. This would be helpful in the above use case, as this part of the config could be held in app-specific settings:
When the intent to Maybe something to consider for 2.x > 0 |
Hey @robmoffat, charts have different use cases that can often be handled in a single application with different settings. Being able to receive these means the chart can be driven by other applications. Further, if some defaults were saved (which ChartIQ and other apps can do internally anyway) then having the optional parameters would allow override of them (e.g. to reproduce a specific chart or to produce a specific type of chart on demand). Remoing the parameters and relying on defaults/preferences alone is definitely limiting into terms of interoperability and might result in duplication (if/when we have to introduce a different type to represent the state of a chart, rather than a request for it). Regarding saving settings... do we do it at the app-level (preferences) or the instance level (workspace state)? The latter is essentially this issue: #386 (raised by @lspiro-Tick42), which several of us have expressed interest in, but have yet to work on proposals for. Each of the container vendors has a proprietary approach to some form of workspace state (and in our case also to preferences). However, please note this comment in the API overview:
That comes from the first version of FDC3, but well describes the ethos of early work on FDC3, which was solely focused on app-to-app interop, rather than app-to-desktop. Personally, I see advantages to opening up FDC3 to more of the issues of an app integrating into a container/desktop agent as that is a key part of the apps working together (workspace state, persisting prefs, notifications, window size/position defaults etc.). I think that's something we would have to agree through a resolution of the Standards Working Group and some clarifying changes to our charter and scope. |
Enhancement Request
Create a context type representing details of a Chart, which may be used to request plotting of a particular chart or to otherwise share details of its composition.
Supercedes issue
Use Case:
FDC3 already defines a
ViewChart
intent, which is typically provided with a basic Instrument context as input. This represents the bare minimum data needed to plot, for example, a pricing chart. However, there are many use-cases for more complex inputs to Charting application, such as:Further, a charting application may wish to output a context representing what it is currently displaying so that it can be recorded by another application
Intents
ViewChart
(as defined in the standard already)
Contexts
Chart
Represents the configuration of a Chart to be or that has been plotted.
Details
type
'fdc3.chart'
instruments
range
style
'line'
|'bar'
|'stacked-bar'
|'mountain'
|'candle'
|'pie'
otherConfig
{ /* undefined object used to contain unstandardized config */}
* See issue:
** It is very common for charts to support other configurations, such as indicators, annotations etc., that a charting application may wish to take as input or produce as output, allowing the chart to fully configured and/or reproduced accurately.
Example
Additional Information
The original version of this issue (#442) and its associated PR (#443) included the specification of an
Indicator
type, which are a key component of modern technical charts. As pushback was received on this element, it has been removed in favour of theotherConfig
element, whose content is unstandardized, allowing applications that require this information to accurately reproduce a chart to still include it in this context.The text was updated successfully, but these errors were encountered: