Week 3 and 4 update (stuck with code)
Devansh Varshney
varshney.devansh614 at gmail.com
Thu Jun 13 18:40:51 UTC 2024
Hi,
I didn't post the update for weeks 3 and 4 as I have been working on
eliminating the gaps between histogram bars that were visible in week 2 on
the UI. This is something I have been wrapping my head around. I was
tempted to get it done, but didn't realize it would take a while.
After discussing with my mentor Tomaz, He explained to me how the zSlot is
being used, and I made changes to the m_aZSlots variable. This variable is
crucial for managing the layering of different data series along the Z-axis
in our charting framework. However, since a histogram typically deals with
a single series of data to create a frequency distribution, we can simplify
this by always using the zero index of m_aZSlots.
void HistogramChart::adaptGapwidthForHistogram()
{
VDataSeries* pFirstSeries = getFirstSeries();
if (!pFirstSeries)
return;
sal_Int32 nAxisIndex = pFirstSeries->getAttachedAxisIndex();
sal_Int32 nUseThisIndex = nAxisIndex;
if (nUseThisIndex < 0 || nUseThisIndex >= m_aGapwidthSequence.getLength())
nUseThisIndex = 0;
auto aGapwidthSequenceRange = asNonConstRange(m_aGapwidthSequence);
for (sal_Int32 nN = 0; nN < m_aGapwidthSequence.getLength(); nN++)
{
aGapwidthSequenceRange[nN] = 0; // Set gap width to 0
}
}
This is what I tried to add for the Gap based on the logic present in the
BarChart.cxx
Now, what he also helped me to understand what I should be focusing on
first is to figure out the way how the X and Y axis can be changed to mimic
the Bins and Frequency. Which I am working on.
So, for these 2 weeks, I am thinking a way to make the X and Y axis working
for the Histogram.
Devansh Varshney <varshney.devansh614 at gmail.com>
Thu, 23 May, 20:10
For this week, the columns/bars are now visible over the UI. I still have
to make proper changes to the model and controller. Now I need to make
changes to modify these changes eventually towards getting the Histogram
plot.
Here's the link to the PR: https://gerrit.libreoffice.org/c/core/+/167068/
--
*Regards,*
*Devansh*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20240614/1d74614f/attachment.htm>
More information about the LibreOffice
mailing list