-
Notifications
You must be signed in to change notification settings - Fork 0
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
Added SecurityCompareConnector #69
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks really solid, I like the concept of defaultly pulling TrailingPerfomance 🎉
Q: When pulling assetAllocations and other types, what about the not-classified number? In XRay, we put it into the column name which isn't ideal, but we need to have this information somewhere, perhaps in the metadata? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
A question though: why do we need to rewrite the converters from SecurityDetails? Could we somehow just reuse them? Parametrize somehow, eg by providing the path to the array with data? (Sorry if I'm missing something obvious here)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, only a minor thing in the demo, other than that looks great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Just a few demo-polishing things and one parser-related discussion
name: typeMapping[item['AssetAllocations_Type_' + id]], | ||
y: item['AssetAllocations_MorningstarEUR3_N_' + id] | ||
})) | ||
.filter(entry => entry.y !== 0) // Filter out entries where y is 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
|
||
|
||
const connector = new HighchartsConnectors.Morningstar.SecurityCompareConnector({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move the connector config under Dash ataPool's config
.map(item => ({ | ||
name: typeMapping[item['AssetAllocations_Type_' + id]], | ||
y: item['AssetAllocations_MorningstarEUR3_N_' + id] | ||
})) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can resign from this. Use dataLabels.format
to apply the translation and columnAssignment to choose the right columns for charts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Directory name:
Let's follow the convention, and since we use Dash here, the directory name should be dashboards-...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still believe this might be optimized. SecurityDetails parses one security. This one parses multiple, just using a bit different code. However under the hood it's the same:
const securityDetails = json[0]; // Details
...
vs
for (let i = 0; i < json.length; i++) {
const securityCompare = json[i], // Compare
...
The way I see it (please correct me if I'm wrong!):
- use only exiting TrailingConverter
- if JSON contains more than one security, then column names are
<name>_MSID
, if just one, then just<name>
metadata.ids
andmetadata.isins
are set for multi-security response. For one security, setmetadata.id
andmetadata.isin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: I didn't check other converters, but perhaps the same can be solution can be used?
Added
SecurityCompareConnector
.